diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-08-01 05:31:59 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-08-01 05:32:43 +0900 |
commit | 25760a492118886f5ecf570458217be8ea978678 (patch) | |
tree | b816816a2bcc74330015fd0e334d98cb35c7c785 /activerecord/lib | |
parent | 673cf4f13b08438bd1bd751420da778c38145df3 (diff) | |
download | rails-25760a492118886f5ecf570458217be8ea978678.tar.gz rails-25760a492118886f5ecf570458217be8ea978678.tar.bz2 rails-25760a492118886f5ecf570458217be8ea978678.zip |
Revert "Merge pull request #24131 from brchristian/limit_and_primary_key"
This reverts commit d162188dd662a7d9f62ba8431474f50bc35e3e93, reversing
changes made to 3576782888c307e3e192c44e332b957cd1174128.
Reason: #24131 conflicts the #5153's default order contract, it means
that existing apps would be broken by that change.
We don't want to break existing apps without a deprecation cycle.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 93f3b67686..c5562c1ff0 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -550,7 +550,7 @@ module ActiveRecord end def ordered_relation - if order_values.empty? && primary_key && limit_value.blank? + if order_values.empty? && primary_key order(arel_attribute(primary_key).asc) else self |