diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2011-09-01 23:54:17 -0500 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-09-02 10:01:47 -0700 |
commit | 67790644372ad3a771810f1d6d99687d795789ea (patch) | |
tree | 658300ee916018a582e00eda4cb3e9d7e2eeb5a3 /activemodel/lib/active_model | |
parent | 36f1612c34577225d1f71c368e70c234d5197707 (diff) | |
download | rails-67790644372ad3a771810f1d6d99687d795789ea.tar.gz rails-67790644372ad3a771810f1d6d99687d795789ea.tar.bz2 rails-67790644372ad3a771810f1d6d99687d795789ea.zip |
Remove hard dependency on bcrypt.
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/secure_password.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index 63380d6ffd..a73276199a 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -1,5 +1,3 @@ -require 'bcrypt' - module ActiveModel module SecurePassword extend ActiveSupport::Concern @@ -30,6 +28,9 @@ module ActiveModel # User.find_by_name("david").try(:authenticate, "notright") # => nil # User.find_by_name("david").try(:authenticate, "mUc3m00RsqyRe") # => user def has_secure_password + gem 'bcrypt-ruby', '~> 3.0.0' + require 'bcrypt' + attr_reader :password validates_confirmation_of :password |