aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorkal <kalrover.ngo@gmail.com>2015-10-16 02:18:36 +0000
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-10-20 15:25:05 -0200
commitdda4f608902752c5071809cedbe675086f0669be (patch)
treedc2b88547400cfea4c8b5ced78b368e7b3b3846e /activerecord/lib/active_record
parentd68e81afa0e5b2697755a34e9b1d11b9b5d1df9d (diff)
downloadrails-dda4f608902752c5071809cedbe675086f0669be.tar.gz
rails-dda4f608902752c5071809cedbe675086f0669be.tar.bz2
rails-dda4f608902752c5071809cedbe675086f0669be.zip
Changed the order of Association constraints from where->order->unscope to unscope->where->order
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/association_scope.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb
index a140dc239c..48437a1c9e 100644
--- a/activerecord/lib/active_record/associations/association_scope.rb
+++ b/activerecord/lib/active_record/associations/association_scope.rb
@@ -147,9 +147,9 @@ module ActiveRecord
scope.includes! item.includes_values
end
+ scope.unscope!(*item.unscope_values)
scope.where_clause += item.where_clause
scope.order_values |= item.order_values
- scope.unscope!(*item.unscope_values)
end
reflection = reflection.next