Skip to content

Instantly share code, notes, and snippets.

@JasonY1
Created November 21, 2014 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JasonY1/f9b900f52542d662d9be to your computer and use it in GitHub Desktop.
Save JasonY1/f9b900f52542d662d9be to your computer and use it in GitHub Desktop.
def reset_password!(new_password, new_password_confirmation)
self.password = new_password
self.password_confirmation = new_password_confirmation
if valid?
clear_reset_password_token
after_password_reset
end
save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment