title: What is update method for Rails Associations?
body: <p>This is so simple that it's ridiculous I couldn't find any information about this anywhere including API docs and Rails source code:</p>
  
  <p>I have a :belongs_to association and I've come to understand the normal model methods you call in the controller when you DON'T have an association are slightly different than the ones when you DO.</p>
  
  <p>For example, I've got my association working fine for the create controller action:</p>
  
  <pre><code>@user = current_user
  @building = Building.new(params[:building])
  
  respond_to do |format|
     if @user.buildings.create(params[:building])
  # et cetera
  </code></pre>
  
  <p>but I can't find docs on how update works: </p>
  
  <pre><code>@user = current_user
  @building = @user.buildings.find(params[:id])
  
  respond_to do |format|
    if @user.buildings.update(params[:building])
  # et cetera
  </code></pre>
  
  <p>Using the update method gives the error "wrong number of arguments (1 for 2)" and I can't figure out what arguments are supposed to be sent.</p>