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:
parent
83f755ff66
commit
022eadddba
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue