title: Update multiple records simultaneously with ActiveRecord in Rails using one query?
body: <p>Let's suppose I have a table called 'user_products' and a corresponding model called UserProduct in my Rails application. I also have a field called 'is_temporary' in my table. Now suppose I want to run a query like this but using the ActiveRecord abstraction layer:</p>
  
  <pre><code>UPDATE user_products SET is_temporary = false WHERE user_id = 12345;
  </code></pre>
  
  <p>Is there a way I can do this using ActiveRecord? Maybe something along the lines of</p>
  
  <pre><code>UserProduct.find_by_user_id(12345).update_attributes(:is_temporary =&gt; false)
  </code></pre>
  
  <p>I'd like only one query to be run for this to happen.</p>