Permalink
Browse files

Correct documentation of SecurePassword

  • Loading branch information...
1 parent f92814e commit 52188c77f12ebe3c54c2d7ff88982a49aaac260b @oscardelben oscardelben committed Apr 24, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 activemodel/lib/active_model/secure_password.rb
@@ -62,7 +62,8 @@ def authenticate(unencrypted_password)
end
end
- # Encrypts the password into the password_digest attribute.
+ # Encrypts the password into the password_digest attribute, only if the
+ # new password is not blank.
def password=(unencrypted_password)
@password = unencrypted_password
unless unencrypted_password.blank?

0 comments on commit 52188c7

Please sign in to comment.