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

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

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.