aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAmit Thawait <amit17thawait@gmail.com>2016-01-20 11:51:42 +0530
committerAmit Thawait <amit17thawait@gmail.com>2016-01-20 11:58:11 +0530
commite1e6d3438b376393e7cf09b17c322a64f51d1cf1 (patch)
treed78123d85c06afa99b27130e9b5718cd278d5c39 /activerecord/lib
parent56a9341689942146d350ff931497956a15152bdb (diff)
downloadrails-e1e6d3438b376393e7cf09b17c322a64f51d1cf1.tar.gz
rails-e1e6d3438b376393e7cf09b17c322a64f51d1cf1.tar.bz2
rails-e1e6d3438b376393e7cf09b17c322a64f51d1cf1.zip
Pluralize counter_cache column name in example [ci skip]
Diffstat (limited to 'activerecord/lib')
-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