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

Merge pull request #1067 from naomik/master

added ability to override redirect_to path after sending reset password instructions
This commit is contained in:
José Valim 2011-05-20 11:12:35 -07:00
commit d2b3f49384

View file

@ -14,7 +14,7 @@ class Devise::PasswordsController < ApplicationController
if resource.errors.empty?
set_flash_message(:notice, :send_instructions) if is_navigational_format?
respond_with resource, :location => new_session_path(resource_name)
respond_with resource, :location => after_sending_reset_password_instructions_path_for(resource_name)
else
respond_with_navigational(resource){ render_with_scope :new }
end
@ -39,4 +39,12 @@ class Devise::PasswordsController < ApplicationController
respond_with_navigational(resource){ render_with_scope :edit }
end
end
protected
# The path used after sending reset password instructions
def after_sending_reset_password_instructions_path_for(resource_name)
new_session_path(resource_name)
end
end