aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/counter_cache.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb
index c654d4703a..f4ee008a12 100644
--- a/activerecord/lib/active_record/counter_cache.rb
+++ b/activerecord/lib/active_record/counter_cache.rb
@@ -105,7 +105,7 @@ module ActiveRecord
end
if touch
- object = find(id)
+ object = find(id.is_a?(Array) ? id.first : id)
updates << object.class.send(:sanitize_sql_for_assignment, touch_updates(object, touch))
end