title: RoR form_for: Hidden field isn't being included within the object parameter and therefore doesn't work.
body: <p>I'm using a form to add an entry, and I need to send the id of the current user along with the entry parameters. Here is my form code:</p>
  
  <pre><code>&lt;% form_for(@entry) do |f| %&gt;
    &lt;%= f.error_messages %&gt;
  &lt;%= hidden_field_tag 'user_id', current_user.id  %&gt;
    &lt;p&gt;
      &lt;%= f.label :date %&gt;&lt;br /&gt;
      &lt;%= f.date_select :date %&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;%= f.label :note %&gt;&lt;br /&gt;
      &lt;%= f.text_field :note %&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;%= f.submit 'Create' %&gt;
    &lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>The problem is that user_id is being saved as null. I noticed in the console output below that user_id is present, but it isn't actually located <strong><em>within</em></strong> the entry object parameters. How can I fix this? Thanks for reading.</p>
  
  <pre><code>Processing EntriesController#create (for 127.0.0.1 at 2010-07-09 19:57:55) [POST]
    Parameters: {"commit"=&gt;"Create", "action"=&gt;"create", "user_id"=&gt;"3", "entry"=&gt;{"date(1i)"=&gt;"2010", "date(2i)"=&gt;"7", "date(3i)"=&gt;"9", "note"=&gt;"bb"}, "controller"=&gt;"entries"}
    Entry Create (0.4ms)   INSERT INTO "entries" ("entry_id", "created_at", "updated_at", "date", "user_id", "note") VALUES(NULL, '2010-07-09 09:57:55', '2010-07-09 09:57:55', '2010-07-09', NULL, 'bb')
  Redirected to http://localhost:3000/entries/7
  Completed in 24ms (DB: 0) | 302 Found [http://localhost/entries]
  </code></pre>