aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-02-27 11:34:41 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-02-27 11:34:41 -0800
commit1b9e19cd22f2b5d5e7b82e042f92340822c0f966 (patch)
tree122d1e83ba4375ea5d9157cbd647eff4b4dc89f9
parent4f82553e545eee290f1fffa5f329b78b4a81b732 (diff)
downloadrails-1b9e19cd22f2b5d5e7b82e042f92340822c0f966.tar.gz
rails-1b9e19cd22f2b5d5e7b82e042f92340822c0f966.tar.bz2
rails-1b9e19cd22f2b5d5e7b82e042f92340822c0f966.zip
only mutate the scope object in the `bind` method
-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 2972b7e13e..618a8c7172 100644
--- a/activerecord/lib/active_record/associations/association_scope.rb
+++ b/activerecord/lib/active_record/associations/association_scope.rb
@@ -41,12 +41,12 @@ module ActiveRecord
def bind_value(scope, column, value)
substitute = alias_tracker.connection.substitute_at(
column, scope.bind_values.length)
- scope.bind_values += [[column, value]]
substitute
end
def bind(scope, table_name, column_name, value)
column = column_for table_name, column_name
+ scope.bind_values += [[column, value]]
bind_value scope, column, value
end