Recoverable class method reset_password should use a bang!

This commit is contained in:
Carlos A. da Silva
2009-10-07 23:01:45 -03:00
parent ba7e74e1a1
commit 97ae1795bd
3 changed files with 6 additions and 6 deletions

View File

@@ -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