title: Multiple objects in a Rails form
body: <p>I want to edit multiple items of my model photo in one form. I am unsure of how to correctly present and POST this with a form, as well as how to gather the items in the update action in the controller.</p>
  
  <p>This is what I want:</p>
  
  <pre><code>&lt;form&gt;
  &lt;input name="photos[1][title]" value="Photo with id 1" /&gt;
  &lt;input name="photos[2][title]" value="Photo with id 2" /&gt;
  &lt;input name="photos[3][title]" value="Custom title" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The parameters are just an example, like I stated above: I am not sure of the best way to POST these values in this form.</p>
  
  <p>In the controller I want to something like this:</p>
  
  <pre><code>@photos = Photo.find( params[photos] )
  @photos.each do |photo|
      photo.update_attributes!(params[:photos][photo] )
  end
  </code></pre>