Browse files

Merge pull request #1750 from 0x000000/v1.0

Added ability to override redirect_to path after sending reset password ...
  • Loading branch information...
2 parents efc42d7 + 873d8dc commit f2cd983b4fc62a7abf04d26078d1703239232b40 @josevalim josevalim committed Mar 29, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 app/controllers/passwords_controller.rb
View
8 app/controllers/passwords_controller.rb
@@ -14,7 +14,7 @@ def create
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 @@ def update
render_with_scope :edit
end
end
+
+ protected
+
+ def after_sending_reset_password_instructions_path_for(resource_name)
+ new_session_path(resource_name)
+ end
end

0 comments on commit f2cd983

Please sign in to comment.