aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/secure_password.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-12-19 09:28:15 +0100
committerJosé Valim <jose.valim@gmail.com>2010-12-19 09:28:15 +0100
commitd592fa946d43fdadf23f872a5c3334fb4f108f80 (patch)
tree904e3947cdd348fae1858ee3feeb82f27c814086 /activemodel/lib/active_model/secure_password.rb
parentbd9dc4ff23ab1e185df6ccf35d6058c0a3d234ce (diff)
downloadrails-d592fa946d43fdadf23f872a5c3334fb4f108f80.tar.gz
rails-d592fa946d43fdadf23f872a5c3334fb4f108f80.tar.bz2
rails-d592fa946d43fdadf23f872a5c3334fb4f108f80.zip
Avoid warnings and fix small typo on SecurePassword.
Diffstat (limited to 'activemodel/lib/active_model/secure_password.rb')
-rw-r--r--activemodel/lib/active_model/secure_password.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index 54191f41df..3e7d3174ac 100644
--- a/activemodel/lib/active_model/secure_password.rb
+++ b/activemodel/lib/active_model/secure_password.rb
@@ -62,9 +62,9 @@ module ActiveModel
private
def password_must_be_strong
- if @password.present?
- errors.add(:password, "must be longer than 6 characters") unless @password.size > 6
- errors.add(:password, "is a too weak and common") if WEAK_PASSWORDS.include?(@password)
+ if password.present?
+ errors.add(:password, "must be longer than 6 characters") unless password.size > 6
+ errors.add(:password, "is too weak and common") if WEAK_PASSWORDS.include?(password)
end
end
end