title: Rails 3 submit a form with multiple records
body: <p>I'm new to rails so this is probably a basic question.  I am trying to create a form where the user can create 3 records at once.  I want the user to only have to click the submit button once.  I'm submitting to my Review model a name, comment, and rating.  Currently, only the last record is entered into the database.</p>
  
  <pre><code>&lt;%= form_for([@user,@review]) do |f| %&gt;
  &lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;Rank&lt;/td&gt;
      &lt;td&gt;Name&lt;/td&gt;
      &lt;td&gt;Comment&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;&lt;%= f.text_field :name %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= f.text_field :comment %&gt;&lt;/td&gt;
      &lt;%= f.hidden_field :rating, :value=&gt; "5" %&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;&lt;%= f.text_field :name %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= f.text_field :comment %&gt;&lt;/td&gt;
      &lt;%= f.hidden_field :rating, :value=&gt; "3" %&gt; 
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;&lt;%= f.text_field :name %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= f.text_field :comment %&gt;&lt;/td&gt;
      &lt;%= f.hidden_field :rating, :value=&gt; "1" %&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
    &lt;div class="actions"&gt;
      &lt;%= f.submit "Create my top 3" %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Any advice is appreciated.  Thanks.</p>