Rails 3 Form: Random Parameter not being updated
<p>I have a rails form; everything works well -- except one parameter is, somehow, not being updated. Everything else is accepted and populated, except this one parameter, which always seems to be blank no matter what I do. The parameter is "file_name".</p>

<p>This is my form:</p>

<pre><code>&lt;h2 align="center"&gt; User &lt;/h2&gt;
&lt;div id="left_half"&gt;
  &lt;div class="ibox"&gt;
    &lt;h3 align="center"&gt; User Profile&lt;/h3&gt;

    &lt;div class="left"&gt;
      &lt;%= f.label :file_name, 'File name', class: 'field_label' %&gt;
    &lt;/div&gt;
    &lt;div class ="right"&gt;
      &lt;%= f.text_field :file_name, class: 'small-text-area' %&gt;
    &lt;/div&gt;

    &lt;div class="left"&gt;
      &lt;%= f.label :email, 'Email', class: 'field_label' %&gt;
    &lt;/div&gt;
    &lt;div class="right"&gt;
      &lt;%= f.text_field :email, class: 'small-text-area' %&gt;
    &lt;/div&gt;
    ...
    ...
</code></pre>

<p>This is my controller create action:</p>

<pre><code>def create
  @user = User.new(params[:user])#user_params)
  if @user.save
    redirect_to @user, notice: 'Entry was successfully added to database'
  else
    render 'new'
  end
end
</code></pre>

<p>This is my model:</p>

<pre><code>class User &lt; ActiveRecord::Base
  unloadable

  validates :file_name, presence: true, length: {maximum: 30}
  validates :email, length: {maximum: 45, minimum: 10}
  ...
  ...
</code></pre>

<p>Also, here's a console session:</p>

<pre><code>User.create(:file_name =&gt; "John", :email =&gt; "Ssdafsafasfafomething")
</code></pre>

<p>Which successfully creates and saves the new user. Also, on the webapp, it displays correctly -- with the filename shown. So mass assignment seems to work for filename...? But then, when I enter data into the form on the webapp, the entry fails, claiming that the file_name can't be blank -- even though I just typed stuff into it!</p>