File: //usr/local/rvm/gems/default/doc/activerecord-6.1.4.1/ri/ActiveRecord/Relation/update_counters-i.ri
U:RDoc::AnyMethod[iI"update_counters:ETI"+ActiveRecord::Relation#update_counters;TF:publico:RDoc::Markup::Document:@parts[
o:RDoc::Markup::Paragraph; [I"AUpdates the counters of the records in the current relation.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading:
leveli : textI"Parameters;T@o:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o;
; [I"p+counter+ - A Hash containing the names of the fields to update as keys and the amount to update as values.;To;;0; [o;
; [I"H<tt>:touch</tt> option - Touch the timestamp columns when updating.;To;;0; [o;
; [I"YIf attributes names are passed, they are updated along with update_at/on attributes.;T@S;;
i ;I"
Examples;T@o:RDoc::Markup::Verbatim; [I"E# For Posts by a given author increment the comment_count by 1.
;TI"GPost.where(author_id: author.id).update_counters(comment_count: 1);T:@format0:
@fileI""lib/active_record/relation.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(counters);T@(FI"
Relation;TcRDoc::NormalClass00