devise: cleanup Users::PasswordController

This commit is contained in:
Pierre de La Morinerie 2021-08-26 15:04:13 -05:00
parent c6b0eddd0b
commit 02bdfef893

View file

@ -37,16 +37,16 @@ class Users::PasswordsController < Devise::PasswordsController
@email = params[:email] @email = params[:email]
end end
# protected protected
# def after_resetting_password_path_for(resource) # def after_resetting_password_path_for(resource)
# super(resource) # super(resource)
# end # end
# The path used after sending reset password instructions def after_sending_reset_password_instructions_path_for(resource_name)
# def after_sending_reset_password_instructions_path_for(resource_name) flash.discard(:notice)
# super(resource_name) users_password_reset_link_sent_path(email: resource.email)
# end end
def try_to_authenticate_instructeur def try_to_authenticate_instructeur
if user_signed_in? if user_signed_in?
@ -78,9 +78,4 @@ class Users::PasswordsController < Devise::PasswordsController
def password_params def password_params
params.require(:user).permit(:reset_password_token, :password) params.require(:user).permit(:reset_password_token, :password)
end end
def after_sending_reset_password_instructions_path_for(resource_name)
flash.discard(:notice)
users_password_reset_link_sent_path(email: resource.email)
end
end end