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
merged 2 commits into from Apr 22, 2012

Conversation

Projects
None yet
3 participants
Contributor

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
fafea15

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

app/controllers/devise/unlocks_controller.rb
@@ -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

josevalim Apr 17, 2012

Owner

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.

Contributor

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
49873f4

@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