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

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Updates all records with details given if they match a set of conditions supplied, limits and order can also be supplied.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Attributes
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>updates</tt> - A String of column and value pairs that will be set on any records that match conditions.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>conditions</tt> - An SQL fragment like &quot;administrator = 1&quot; or [ &quot;user_name = ?&quot;, username ]. See conditions in the intro for more info.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>options</tt> - Additional options are <tt>:limit</tt> and/or <tt>:order</tt>, see the examples for usage.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  # Update all billing objects with the 3 different attributes given\n  Billing.update_all( &quot;category = 'authorized', approved = 1, author = 'David'&quot; )\n\n  # Update records that match our conditions\n  Billing.update_all( &quot;author = 'David'&quot;, &quot;title LIKE '%Rails%'&quot; )\n\n  # Update records that match our conditions but limit it to 5 ordered by date\n  Billing.update_all( &quot;author = 'David'&quot;, &quot;title LIKE '%Rails%'&quot;,\n                        :order =&gt; 'created_at', :limit =&gt; 5 )\n"
full_name: ActiveRecord::Base::update_all
is_singleton: true
name: update_all
params: (updates, conditions = nil, options = {})
visibility: public
