From eebb19c954d64760c232cda10263200f32fcf036 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 13 Apr 2011 09:42:31 -0700 Subject: use index based substitution for bind parameters --- activerecord/lib/active_record/relation/finder_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/relation') diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 673e47942b..aae257a0e7 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -320,7 +320,7 @@ module ActiveRecord column = columns_hash[primary_key] - substitute = connection.substitute_for(column, @bind_values) + substitute = connection.substitute_at(column, @bind_values.length) relation = where(table[primary_key].eq(substitute)) relation.bind_values = [[column, id]] record = relation.first -- cgit v1.2.3