diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-10-10 09:11:05 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2013-10-10 09:11:05 -0700 |
commit | a8a33ac663fce963a59517132c1154f43e9a85ad (patch) | |
tree | 15b3adf8d41331c8366ef7666127d0b5ffc7f8ab /activemodel/lib | |
parent | 9dbd208562ccd3d68009a72d37cbfe29b94f98c4 (diff) | |
parent | 5d7b413d84e5858dba50e716c31981b42c40aba6 (diff) | |
download | rails-a8a33ac663fce963a59517132c1154f43e9a85ad.tar.gz rails-a8a33ac663fce963a59517132c1154f43e9a85ad.tar.bz2 rails-a8a33ac663fce963a59517132c1154f43e9a85ad.zip |
Merge pull request #12339 from tjschuck/bcrypt_cost_attr
Use bcrypt's public cost attr instead of internal constant
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/secure_password.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index 17fafe4be9..f87c36e39e 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -103,7 +103,7 @@ module ActiveModel def password=(unencrypted_password) unless unencrypted_password.blank? @password = unencrypted_password - cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST : BCrypt::Engine::DEFAULT_COST + cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST : BCrypt::Engine.cost self.password_digest = BCrypt::Password.create(unencrypted_password, cost: cost) end end |