added ability to override redirect_to path after sending reset password instructions #1067

Merged
merged 1 commit into from May 20, 2011

Conversation

Projects
None yet
4 participants
Contributor

naomik commented May 13, 2011

def after_sending_reset_password_instructions_path_for(resource_name)
  new_session_path(resource_name)
end
Owner

josevalim commented May 13, 2011

Thanks for your pull request! Could you please include tests as well? :D

Contributor

joshk commented May 20, 2011

+1 for this feature, we had to hax around this a little for our app.

josevalim added a commit that referenced this pull request May 20, 2011

Merge pull request #1067 from naomik/master
added ability to override redirect_to path after sending reset password instructions

@josevalim josevalim merged commit d2b3f49 into plataformatec:master May 20, 2011

Can you add this to the application controller to override like after_sign_in_path_for? Or must I extend the password controller?

Owner

josevalim commented Aug 4, 2011

You must extend the controller.

Would it be possible to make after_sending_reset_password_instructions_path_for like after_sign_in_path_for? Therefore, you only need to set that in the application controller?

Owner

josevalim commented Aug 4, 2011

No, because sign in is a concern that spreads throughout the application.
You can sign in through an specific controller (SessionsController) or
through an API, cookie (which then happens in any controller), etc. The
reset password hook is specific to the passwords controller though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment