mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Merge pull request #1750 from 0x000000/v1.0
Added ability to override redirect_to path after sending reset password ...
This commit is contained in:
commit
f2cd983b4f
1 changed files with 7 additions and 1 deletions
|
@ -14,7 +14,7 @@ class PasswordsController < ApplicationController
|
|||
|
||||
if resource.errors.empty?
|
||||
set_flash_message :notice, :send_instructions
|
||||
redirect_to new_session_path(resource_name)
|
||||
redirect_to after_sending_reset_password_instructions_path_for(resource_name)
|
||||
else
|
||||
render_with_scope :new
|
||||
end
|
||||
|
@ -38,4 +38,10 @@ class PasswordsController < ApplicationController
|
|||
render_with_scope :edit
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def after_sending_reset_password_instructions_path_for(resource_name)
|
||||
new_session_path(resource_name)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue