aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorप्रथमेश Sonpatki <csonpatki@gmail.com>2016-01-20 12:37:46 +0530
committerप्रथमेश Sonpatki <csonpatki@gmail.com>2016-01-20 12:37:46 +0530
commit715cbd3fdcade7c4fdae944c4a448252317faff9 (patch)
treed78123d85c06afa99b27130e9b5718cd278d5c39
parent56a9341689942146d350ff931497956a15152bdb (diff)
parente1e6d3438b376393e7cf09b17c322a64f51d1cf1 (diff)
downloadrails-715cbd3fdcade7c4fdae944c4a448252317faff9.tar.gz
rails-715cbd3fdcade7c4fdae944c4a448252317faff9.tar.bz2
rails-715cbd3fdcade7c4fdae944c4a448252317faff9.zip
Merge pull request #23129 from Amit-Thawait/master
Pluralize counter_cache column name in example [ci skip]
-rw-r--r--activerecord/lib/active_record/counter_cache.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb
index 9e7d391c70..1b6817554d 100644
--- a/activerecord/lib/active_record/counter_cache.rb
+++ b/activerecord/lib/active_record/counter_cache.rb
@@ -97,8 +97,8 @@ module ActiveRecord
#
# ==== Examples
#
- # # Increment the post_count column for the record with an id of 5
- # DiscussionBoard.increment_counter(:post_count, 5)
+ # # Increment the posts_count column for the record with an id of 5
+ # DiscussionBoard.increment_counter(:posts_count, 5)
def increment_counter(counter_name, id)
update_counters(id, counter_name => 1)
end
@@ -115,8 +115,8 @@ module ActiveRecord
#
# ==== Examples
#
- # # Decrement the post_count column for the record with an id of 5
- # DiscussionBoard.decrement_counter(:post_count, 5)
+ # # Decrement the posts_count column for the record with an id of 5
+ # DiscussionBoard.decrement_counter(:posts_count, 5)
def decrement_counter(counter_name, id)
update_counters(id, counter_name => -1)
end