Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Added after_sending_reset_unlock_instructions_path_for #1796

merged 2 commits into from Apr 22, 2012


None yet
3 participants

mkremer commented Apr 17, 2012

This pull request allows you to easily override the redirect behavior of the unlocks controller.

@mkremer mkremer Added after_sending_reset_unlock_instructions_path_for which can be o…
…verridden in extensions to modify the redirect path

@josevalim josevalim commented on an outdated diff Apr 17, 2012

@@ -23,9 +23,17 @@ def show
if resource.errors.empty?
set_flash_message :notice, :unlocked if is_navigational_format?
- respond_with_navigational(resource){ redirect_to new_session_path(resource) }
+ respond_with_navigational(resource){ redirect_to after_sending_reset_unlock_instructions_path_for(resource) }

josevalim Apr 17, 2012


Here we are not sending unlock instructions, but rather unlocking an account. Or we need to leave it as before or add a new hook.


mkremer commented Apr 17, 2012

Thanks for clarifying that, I've added an additional hook in my latest commit

@carlosantoniodasilva carlosantoniodasilva added a commit that referenced this pull request Apr 22, 2012

@carlosantoniodasilva carlosantoniodasilva Merge pull request #1796 from mkremer/feature/devise_redirects
Added after_sending_reset_unlock_instructions_path_for

@carlosantoniodasilva carlosantoniodasilva merged commit 49873f4 into plataformatec:master Apr 22, 2012

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