Skip to content

Instantly share code, notes, and snippets.

@grepsedawk
Created December 17, 2016 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grepsedawk/0c12ecd42ad429f48b9301440e1bcd54 to your computer and use it in GitHub Desktop.
Save grepsedawk/0c12ecd42ad429f48b9301440e1bcd54 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
# this addition might/might not be needed. Try it without first.
before_action :configure_permitted_parameters, if: :devise_controller?
def configure_permitted_parameters
devise_parameter_sanitizer.for(:account_update) { |u|
u.permit(:password, :password_confirmation, :current_password)
}
end
end
<%= link_to "Change your password", edit_user_registration_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment