From 43405a75bd0ba7ec2a0add751ccd0a179e3129de Mon Sep 17 00:00:00 2001 From: Matthew Robertson Date: Sun, 2 Dec 2012 19:00:12 -0800 Subject: [PATCH] increment_counter and decrement_counter can accept and array of ids as an arg --- activerecord/lib/active_record/counter_cache.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb index c53b7b3e78..4c5326ead6 100644 --- a/activerecord/lib/active_record/counter_cache.rb +++ b/activerecord/lib/active_record/counter_cache.rb @@ -88,7 +88,7 @@ def update_counters(id, counters) # ==== Parameters # # * +counter_name+ - The name of the field that should be incremented. - # * +id+ - The id of the object that should be incremented. + # * +id+ - The id of the object that should be incremented or an Array of ids. # # ==== Examples # @@ -105,7 +105,7 @@ def increment_counter(counter_name, id) # ==== Parameters # # * +counter_name+ - The name of the field that should be decremented. - # * +id+ - The id of the object that should be decremented. + # * +id+ - The id of the object that should be decremented or an Array of ids. # # ==== Examples # -- GitLab