From de9e9bbbada37626ae32aadc1ae6055b61452817 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 11 Jun 2013 15:13:04 -0700 Subject: bind values should not be merged between scopes --- activerecord/lib/active_record/associations/association_scope.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb index aa5551fe0c..f1bec5787a 100644 --- a/activerecord/lib/active_record/associations/association_scope.rb +++ b/activerecord/lib/active_record/associations/association_scope.rb @@ -96,7 +96,7 @@ module ActiveRecord item = eval_scope(klass, scope_chain_item) if scope_chain_item == self.reflection.scope - scope.merge! item.except(:where, :includes) + scope.merge! item.except(:where, :includes, :bind) end scope.includes! item.includes_values -- cgit v1.2.3