aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-02-27 16:48:34 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-02-27 16:48:34 -0800
commitacf7e86024fa8f7768f02a84688ae6e20c808c9c (patch)
tree67edc695f4adba23d910a37674e042cca0fab97e /activerecord
parentf42c96331a4882cf36dfa7cd305c00dc4fae03dd (diff)
downloadrails-acf7e86024fa8f7768f02a84688ae6e20c808c9c.tar.gz
rails-acf7e86024fa8f7768f02a84688ae6e20c808c9c.tar.bz2
rails-acf7e86024fa8f7768f02a84688ae6e20c808c9c.zip
Revert "only mutate the scope object in the `bind` method"
This reverts commit 1b9e19cd22f2b5d5e7b82e042f92340822c0f966.
Diffstat (limited to 'activerecord')
-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 618a8c7172..2972b7e13e 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