diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/counter_cache.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb index 020f4b872e..a0ef430683 100644 --- a/activerecord/lib/active_record/counter_cache.rb +++ b/activerecord/lib/active_record/counter_cache.rb @@ -106,9 +106,7 @@ module ActiveRecord if touch object = find(id) - touch_updates(object, touch).each do |column, touch_time| - updates << "#{connection.quote_column_name(column.to_s)} = #{connection.quote(touch_time)}" - end + updates << object.class.send(:sanitize_sql_for_assignment, touch_updates(object, touch)) end unscoped.where(primary_key => id).update_all updates.join(", ") |