1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

don't impose primary key order if limit() is defined

This commit is contained in:
Brian Christian 2016-03-09 19:40:23 -08:00
parent 83f755ff66
commit 022eadddba

View file

@ -550,7 +550,7 @@ module ActiveRecord
end end
def ordered_relation def ordered_relation
if order_values.empty? && primary_key if order_values.empty? && primary_key && limit_value.blank?
order(arel_attribute(primary_key).asc) order(arel_attribute(primary_key).asc)
else else
self self