diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index ea8f44752b0c4..dc044c3da3787 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -470,16 +470,16 @@ def update(id = :all, attributes) # :nodoc: # Updates the counters of the records in the current relation. # - # === Parameters + # ==== Parameters # # * +counter+ - A Hash containing the names of the fields to update as keys and the amount to update as values. # * :touch option - Touch the timestamp columns when updating. # * If attributes names are passed, they are updated along with update_at/on attributes. # - # === Examples + # ==== Examples # - # # For Posts by a given author increment the comment_count by 1. - # Post.where(author_id: author.id).update_counters(comment_count: 1) + # # For Posts by a given author increment the comment_count by 1. + # Post.where(author_id: author.id).update_counters(comment_count: 1) def update_counters(counters) touch = counters.delete(:touch)