title: Empty file_field on submit: param is missing or the value is empty
body: <p>I have a application <strong>with dragonfly</strong> to manage my image uploads:</p>
  <ul>
  <li>ruby 2.1.3</li>
  <li>rails 4.1.6</li>
  </ul>
  <p>The upload works but on update action, <strong>when the file is empty</strong>, I have the following message:</p>
  <blockquote>
  <p><strong>ActionController::ParameterMissing in UsersController#update_avatar</strong></p>
  <p>param is missing or the value is empty: user</p>
  </blockquote>
  <p>It make senses because I'm passing no params on submit. But what about validation?</p>
  <p><strong>Model:</strong></p>
  <pre><code>class User &lt; ActiveRecord::Base
    dragonfly_accessor :avatar
    
    ...
  
    validates_presence_of :avatar
  
    ...
  </code></pre>
  <p><strong>Controller:</strong></p>
  <pre><code>class UsersController &lt; ApplicationController
    ...
  
    def update_avatar
      @user = User.find_by(id: current_user.id)
      respond_to do |format|
        if @user.update(user_params)
          format.html { redirect_to edit_user_avatar_url, notice: t('flash.actions.update_avatar.notice') }
          format.json { render :show, status: :ok, location: @user }
         else
           format.html { render :edit }
           format.json { render json: @user.errors, status: :unprocessable_entity }
         end
       end
     end
  
     ...
  
     def user_params
       params.require(:user).permit(:username, :name, :avatar, :birth)
     end
  end
  </code></pre>
  <p><strong>VIEW:</strong></p>
  <pre><code>- case params[:action]
  
  ...
  
  - when 'edit_avatar', 'update_avatar'
    = form_for @user, url: { action: 'update_avatar'} do |f|
      ul.list-form
        li.item-form 
          = f.label :avatar
            span.label-title
              ' Foto:
            = f.file_field :avatar
  
      .submit-area
        = button_tag &quot;&lt;span class='wrapper'&gt;Update Avatar&lt;/span&gt;&quot;.html_safe, class: 'bt'
  
  ...
  </code></pre>
  <p>What am I doing wrong? The validation seems not working.</p>
  <p><strong>UPDATE:</strong></p>
  <p>I'm passing the <strong>id</strong> parameter via hidden_field (I don't like this solution...) and solve the parcial problem.</p>
  <p><strong>But the validation is still not working.</strong></p>
  <pre><code>= hidden_field(:user, :id)
  </code></pre>