title: Saving data from select_tag
body: <p>Trying to save data from a form to the database.
  Using the select_tag</p>
  
  <pre><code>&lt;%= select_tag :size, options_from_collection_for_select(@plan, 'name', 'size') %&gt;
  </code></pre>
  
  <p>Everything is fine, it grabs both size and email ,but when I try to store the data from the form (size), it passes NULL.</p>
  
  <p>Here's my console:</p>
  
  <pre><code>Started POST "/users" for 127.0.0.1 at 2011-06-24 07:25:29 -0500
  Processing by UserController#create as HTML
  Parameters: {"utf8"=&gt;"✓",   "authenticity_token"=&gt;"MfT3gs5TtR+bvpaLro0E8Qm1zojaY2ms9WK0WprKPAw=", "size"=&gt;"small",
  "user"=&gt;{"email"=&gt;"5@gmail.com"}, "commit"=&gt;"Create User"}
  AREL (0.4ms)  INSERT INTO "users" ("email", "size", "created_at", "updated_at") VALUES
   ('5@gmail.com', NULL, '2011-06-24 12:25:29.646814', '2011-06-24 12:25:29.646814')
  Redirected to http://localhost:3000/users/14
  Completed 302 Found in 56ms
  </code></pre>
  
  <p>So, It gets the correct data from the form, as you see "size"=>"small", but when its time to store it, it passes it as NULL,</p>
  
  <pre><code> VALUES ('5@gmail.com', NULL, '2011-06-24
  </code></pre>
  
  <p>I thought, it was the select_tag, as it doesnt have u attached, as text_field does</p>
  
  <pre><code>&lt;%= form_for @user do |u| %&gt;
                      &lt;%= render 'shared/error_messages' %&gt;
                          &lt;p&gt;&lt;%= u.label :size, 'How many employees do you have?' %&gt;: &lt;/p&gt;
                          &lt;p&gt;&lt;%= select_tag :size, options_from_collection_for_select(@plan, 'name', 'size') %&gt;&lt;/p&gt;
  
                          &lt;p&gt;&lt;%= u.label :email, 'What\'s your email address?' %&gt;:&lt;/p&gt;
                          &lt;p&gt;&lt;%= u.text_field :email %&gt;&lt;/p&gt;
                          &lt;%= u.submit%&gt;
                      &lt;% end %&gt;
  </code></pre>
  
  <p>But when I tried u.select_tag = Error, undefined method.</p>
  
  <p>My model</p>
  
  <pre><code>  class User &lt; ActiveRecord::Base
  attr_accessible :size, :email
  end
  </code></pre>
  
  <p>Any thoughts?</p>