From 85f3a57a57b3c6d105e35936bf3ee972dc652902 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 11 Apr 2014 16:14:51 -0700 Subject: propogate bind values collected in arel to SQL generation --- activerecord/lib/active_record/relation.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index a0e84201be..5b635ca7c1 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -326,7 +326,8 @@ module ActiveRecord stmt.wheres = arel.constraints end - @klass.connection.update stmt, 'SQL', bind_values + bvs = bind_values + arel.bind_values + @klass.connection.update stmt, 'SQL', bvs end # Updates an object (or multiple objects) and saves it to the database, if validations pass. -- cgit v1.2.3