1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

redirect to after_resetting_password_path always

This commit is contained in:
Feng Ye 2015-07-10 20:01:42 +08:00
parent 737a55f9e1
commit 4d89c709a5

View file

@ -38,11 +38,10 @@ class Devise::PasswordsController < DeviseController
flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
set_flash_message(:notice, flash_message) if is_flashing_format?
sign_in(resource_name, resource)
respond_with resource, location: after_resetting_password_path_for(resource)
else
set_flash_message(:notice, :updated_not_active) if is_flashing_format?
respond_with resource, location: new_session_path(resource_name)
end
respond_with resource, location: after_resetting_password_path_for(resource)
else
respond_with resource
end
@ -50,7 +49,7 @@ class Devise::PasswordsController < DeviseController
protected
def after_resetting_password_path_for(resource)
after_sign_in_path_for(resource)
Devise.sign_in_after_reset_password ? after_sign_in_path_for(resource) : new_session_path(resource_name)
end
# The path used after sending reset password instructions