mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Merge pull request #3670 from fengye87/master
redirect to after_resetting_password_path always
This commit is contained in:
commit
f0a168da5a
1 changed files with 2 additions and 3 deletions
|
@ -38,11 +38,10 @@ class Devise::PasswordsController < DeviseController
|
||||||
flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
|
flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
|
||||||
set_flash_message(:notice, flash_message) if is_flashing_format?
|
set_flash_message(:notice, flash_message) if is_flashing_format?
|
||||||
sign_in(resource_name, resource)
|
sign_in(resource_name, resource)
|
||||||
respond_with resource, location: after_resetting_password_path_for(resource)
|
|
||||||
else
|
else
|
||||||
set_flash_message(:notice, :updated_not_active) if is_flashing_format?
|
set_flash_message(:notice, :updated_not_active) if is_flashing_format?
|
||||||
respond_with resource, location: new_session_path(resource_name)
|
|
||||||
end
|
end
|
||||||
|
respond_with resource, location: after_resetting_password_path_for(resource)
|
||||||
else
|
else
|
||||||
respond_with resource
|
respond_with resource
|
||||||
end
|
end
|
||||||
|
@ -50,7 +49,7 @@ class Devise::PasswordsController < DeviseController
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def after_resetting_password_path_for(resource)
|
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
|
end
|
||||||
|
|
||||||
# The path used after sending reset password instructions
|
# The path used after sending reset password instructions
|
||||||
|
|
Loading…
Reference in a new issue