aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorOscar Del Ben <info@oscardelben.com>2012-04-24 19:08:57 +0200
committerOscar Del Ben <info@oscardelben.com>2012-04-24 19:08:57 +0200
commit52188c77f12ebe3c54c2d7ff88982a49aaac260b (patch)
treefb9072a6e4825400a1cd1434240488552c419193 /activemodel
parentf92814e4cc2a381fab7df374fbee5f86ebe91fa6 (diff)
downloadrails-52188c77f12ebe3c54c2d7ff88982a49aaac260b.tar.gz
rails-52188c77f12ebe3c54c2d7ff88982a49aaac260b.tar.bz2
rails-52188c77f12ebe3c54c2d7ff88982a49aaac260b.zip
Correct documentation of SecurePassword
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/secure_password.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index e7a57cf691..cc0dfb1860 100644
--- a/activemodel/lib/active_model/secure_password.rb
+++ b/activemodel/lib/active_model/secure_password.rb
@@ -62,7 +62,8 @@ module ActiveModel
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?