Ruby on Rails latest stable (v4.1.8) - 0 notes - Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

Method deprecated or moved


add_order_by_for_association_limiting!(sql, options) public

Returns an ORDER BY clause for the passed order option.

PostgreSQL does not allow arbitrary ordering when using DISTINCT ON, so we work around this by wrapping the sql string as a sub-select and ordering in that query.

Show source
Register or log in to add new notes.