Re:Speeding Up PostgreSQL with Partial Indexes
by pjungwir on Wednesday December 10, 2014 @11:24PM
(#8733186)
Here is a gem I wrote that uses a separate DSL to track indexes (including partial indexes), check constraints, and foreign keys. Rails 4 is starting to make this gem obsolete, but it still offers more than you get from vanilla Rails.
https://github.com/pjungwir/db_leftovers