title: Bulk update attribute on multiple models in ActiveRecord?
body: <p>I have a simple <code>has_many</code> association, and I want to change an attribute from <code>public</code> to <code>private</code> the associated object.  What's the best way to do this:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_many :posts
  end
  
  class Post &lt; ActiveRecord::Base
    belongs_to :user
  end
  
  user = User.first #=&gt; #&lt;User...&gt;
  user.posts.count #=&gt; 100
  # something like this:
  user.posts.bulk_update_attribute("privacy", "private") #=&gt; 1 DB call
  </code></pre>