Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add callback for password changes #3631

Closed
reedloden opened this issue Jun 14, 2015 · 2 comments
Closed

Add callback for password changes #3631

reedloden opened this issue Jun 14, 2015 · 2 comments

Comments

@reedloden
Copy link

I'd like to perform certain actions on a successful password change. A callback would be nice. There's after_password_reset, but that's been deprecated and doesn't cover all my use cases anyway.

@josevalim
Copy link
Contributor

You can do this in two ways:

  1. Have a before_save callback that checks if the encrypted password changed and work based on that
  2. Override reset_password in your model and call super in there

@rcanand
Copy link

rcanand commented May 13, 2016

I overrode reset_password in my user model, but a byebug in that method does not hit when I reset the password from registrations/edit page.

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

No branches or pull requests

3 participants