--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Increment a number field by one, usually representing a count.
- !ruby/struct:SM::Flow::P 
  body: This is used for caching aggregate values, so that they don't need to be computed every time. For example, a DiscussionBoard may cache post_count and comment_count otherwise every time the board is shown it would have to run an SQL query to find how many posts and comments there are.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>counter_name</tt> - The name of the field that should be incremented.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>id</tt> - The id of the object that should be incremented.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  # Increment the post_count column for the record with an id of 5\n  DiscussionBoard.increment_counter(:post_count, 5)\n"
full_name: ActiveRecord::Base::increment_counter
is_singleton: true
name: increment_counter
params: (counter_name, id)
visibility: public
