1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

only mutate the scope object in the bind method

This commit is contained in:
Aaron Patterson 2012-02-27 11:34:41 -08:00
parent 4f82553e54
commit 1b9e19cd22

View file

@ -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