title: Update embedded document in mongoid
body: <p>I have a simple bids model that embeds a supplier:</p>
  
  <pre><code>class Bid
    include Mongoid::Document
    field :amount, type: Integer
    embeds_one :supplier
    accepts_nested_attributes_for :supplier
  end
  </code></pre>
  
  <p>Many bids have the same supplier. If I was using a scaffolded edit view, how would I update all of the instances of the embedded supplier in bids in the update method? </p>
  
  <p>I have tried, unsuccessfully, something like </p>
  
  <pre><code>def update
    @supplier.update(supplier_params)
    #or
    #bids = Bid.where('supplier._id' =&gt; @supplier.id)
    #bids.supplier.update_attributes!(supplier_params)
    redirect_to @supplier
  end
  </code></pre>