diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 599d04e593..8a8d956ca8 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -287,6 +287,12 @@ module ActiveRecord def distinct(columns, order_by) "DISTINCT #{columns}" end + + # ORDER BY clause for the passed order option. + # PostgreSQL overrides this due to its stricter standards compliance. + def add_order_by_for_association_limiting!(sql, options) + sql << "ORDER BY #{options[:order]}" + end end end end |