Created
February 28, 2011 13:16
-
-
Save tomash/847299 to your computer and use it in GitHub Desktop.
override method for devise password recovery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fails after one call even when not doing anything invasive at all: | |
Devise::PasswordsController.class_eval do | |
# POST /resource/password | |
def create | |
# email is not unique, so iterate amongst all the users | |
resource_class.where(:email => params[resource_name][:email]).all.each do |res| | |
logger.info res.username | |
end | |
redirect_to new_session_path(resource_name) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment