Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added after_unlock_path_for to allow override of redirect after account

unlock
  • Loading branch information...
commit 0e0bfe668684c40401bd3d4c813cac3b908c9146 1 parent fafea15
@mkremer mkremer authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/controllers/devise/unlocks_controller.rb
View
7 app/controllers/devise/unlocks_controller.rb
@@ -23,7 +23,7 @@ def show
if resource.errors.empty?
set_flash_message :notice, :unlocked if is_navigational_format?
- respond_with_navigational(resource){ redirect_to after_sending_reset_unlock_instructions_path_for(resource) }
+ respond_with_navigational(resource){ redirect_to after_unlock_path_for(resource) }
else
respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render :new }
end
@@ -36,4 +36,9 @@ def after_sending_reset_unlock_instructions_path_for(resource)
new_session_path(resource)
end
+ # The path used after unlocking the resource
+ def after_unlock_path_for(resource)
+ new_session_path(resource)
+ end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.