aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-08-01 06:24:14 +0900
committerGitHub <noreply@github.com>2018-08-01 06:24:14 +0900
commit57a91c4d4232b5a18f1514e82e7bc8d23254cfeb (patch)
tree246b2a905160b74911c91168ee2ab2f19cc73c85 /activerecord/lib/active_record/relation
parentb66bf91316d6726be359331bcaf436df66a9d257 (diff)
parent25760a492118886f5ecf570458217be8ea978678 (diff)
downloadrails-57a91c4d4232b5a18f1514e82e7bc8d23254cfeb.tar.gz
rails-57a91c4d4232b5a18f1514e82e7bc8d23254cfeb.tar.bz2
rails-57a91c4d4232b5a18f1514e82e7bc8d23254cfeb.zip
Merge pull request #33492 from kamipo/revert_breaking_default_order_contract
Revert the breaking existing default sort order contract
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
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