mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Recoverable class method reset_password should use a bang!
This commit is contained in:
@@ -52,7 +52,7 @@ module Devise
|
||||
# in perishable_token attribute.
|
||||
# Options must contain perishable_token, password and confirmation
|
||||
#
|
||||
def reset_password(options={})
|
||||
def reset_password!(options={})
|
||||
recoverable = find_or_initialize_with_error_by_perishable_token(options[:perishable_token])
|
||||
recoverable.reset_password!(options[:password], options[:password_confirmation]) unless recoverable.new_record?
|
||||
recoverable
|
||||
|
||||
Reference in New Issue
Block a user