Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def change_password old_password, password, password_confirmation
- tap do
- self.password, self.password_confirmation = password, password_confirmation
- if self.authenticate(old_password)
- save
- else
- self.errors.add :password, message: "is not correct"
- end
- end
- end
Add Comment
Please, Sign In to add comment