title: Rails 4 with Devise and Paperclip
body: <p>Model User has an avatar (as paperclip field generated).
  If I want to let user change him avatar on registration's edit page (view is devise/registrations/edit.html.erb), I added this strings to view:</p>
  
  <p>Before I added:</p>
  
  <pre><code>multipart: true
  </code></pre>
  
  <p>to HTML-options of the form, after I added:</p>
  
  <pre><code>&lt;%= f.file_field :avatar %&gt;
  </code></pre>
  
  <p>But avatar doesn't change, and there is error in console:</p>
  
  <pre><code>Unpermitted parameters: avatar
  </code></pre>
  
  <p>I tryed add custom RegistrationsController &lt; Devise::RegistrationsController and add update action with this code:</p>
  
  <pre><code>params = params.require(:user).permit(:email, :password, :password_confirmation, :current_password, :avatar)
  super
  </code></pre>
  
  <p>But it doesn't work.
  And attr_accessible deprecated in Rails 4 and too doesn't work.</p>