title: Devise Strong Parameters when trying to update user account
body: <p>I am trying to move from the account update page and submit it. I think i am having problems with devise and this submitting. I have tried a few things in the application controller but have not had any joy. Also i have read through the devise docs but this hasnt worked for me either. The error i am getting is the following: 1 error prohibited this user from being saved: Current password can't be blank
  This is the case when i have input the users current password? I have included the errors from my terminal and also the code from my application controller.</p>
  
  <pre><code>Processing by Devise::RegistrationsController#update as HTML
        Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"DVVUgIGna8TZwJTBU/ghNT7PTcO/CERC0JXUUQWOW/o=", "user"=&gt;{"name"=&gt;"Emma", "email"=&gt;"n@m.com", "password"=&gt;"[FILTERED]", "password_confirmation"=&gt;"[FILTERED]", "current_password"=&gt;"[FILTERED]", "line1"=&gt;"", "line2"=&gt;"", "town"=&gt;"", "county"=&gt;"", "postcode"=&gt;"", "organization"=&gt;""}, "commit"=&gt;"Update"}
        User Load (0.3ms)  SELECT  "users".* FROM "users"  WHERE "users"."id" = 21  ORDER BY "users"."id" ASC LIMIT 1
        User Load (0.4ms)  SELECT  "users".* FROM "users"  WHERE "users"."id" = ? LIMIT 1  [["id", 21]]
      Unpermitted parameters: email, password, password_confirmation, current_password, organization
  
  
  
  
  
  
    class ApplicationController &lt; ActionController::Base
    # Prevent CSRF attacks by raising an exception.
    # For APIs, you may want to use :null_session instead.
    protect_from_forgery with: :exception
  
     before_filter :configure_permitted_parameters, if: :devise_controller?
  
    protected
  
    def configure_permitted_parameters
      devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:name, :email, :password) }
      devise_parameter_sanitizer.for(:account_update) { |u| u.permit(:name, :line1, :line2, :town, :county, :postcode)}
    end
  
   private
    def after_sign_in_path_for(resource)
      edit_user_registration_path(current_user) #basically whichever path you think meets your needs
    end
  end
  </code></pre>