active_record_distinct_on (rubygems): ActiveRecordDistinctOn adds support for `DISTINCT ON` to ActiveRecord. At the time of this writing, PostgreSQL is the only database which supports this syntax; however, this gem has been written with database independence in mind so that if another Arel visitor adds support for `Arel::Nodes::DistinctOn` in the future, it should work seamlessly.
Keywords: activerecord|arel|database|rails|ruby|sql