aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/preloader/association.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-10-29 17:20:34 +0100
committerYves Senn <yves.senn@gmail.com>2015-10-29 17:47:47 +0100
commit857a34a41622300457c0a52885d53344a3e36505 (patch)
tree39cabcc3c5331737d9a6dcfdc4ca273a776da3b7 /activerecord/lib/active_record/associations/preloader/association.rb
parent3ad796eccc16f45ec65d0b4ba06d569fc3a92b30 (diff)
downloadrails-857a34a41622300457c0a52885d53344a3e36505.tar.gz
rails-857a34a41622300457c0a52885d53344a3e36505.tar.bz2
rails-857a34a41622300457c0a52885d53344a3e36505.zip
Revert "Revert "Merge pull request #22026 from akihiro17/fix-preload-association""
This reverts commit 5243946017d09afff4d70d273b0fcdfd41a4b22a. This fixes an issue with the build where tests would fail on mysql and postgresql due to different ordering.
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader/association.rb')
-rw-r--r--activerecord/lib/active_record/associations/preloader/association.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/association.rb b/activerecord/lib/active_record/associations/preloader/association.rb
index 29dd0643d6..c43f13f3c4 100644
--- a/activerecord/lib/active_record/associations/preloader/association.rb
+++ b/activerecord/lib/active_record/associations/preloader/association.rb
@@ -136,6 +136,10 @@ module ActiveRecord
end
scope.order! preload_values[:order] || values[:order]
+ if preload_values[:reordering] || values[:reordering]
+ scope.reordering_value = true
+ end
+
if preload_values[:readonly] || values[:readonly]
scope.readonly!
end