From 857a34a41622300457c0a52885d53344a3e36505 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Thu, 29 Oct 2015 17:20:34 +0100 Subject: 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. --- activerecord/lib/active_record/associations/preloader/association.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/associations/preloader/association.rb') 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 -- cgit v1.2.3