aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2011-09-01 23:54:17 -0500
committerAaron Patterson <aaron.patterson@gmail.com>2011-09-02 10:01:47 -0700
commit67790644372ad3a771810f1d6d99687d795789ea (patch)
tree658300ee916018a582e00eda4cb3e9d7e2eeb5a3 /activemodel/lib
parent36f1612c34577225d1f71c368e70c234d5197707 (diff)
downloadrails-67790644372ad3a771810f1d6d99687d795789ea.tar.gz
rails-67790644372ad3a771810f1d6d99687d795789ea.tar.bz2
rails-67790644372ad3a771810f1d6d99687d795789ea.zip
Remove hard dependency on bcrypt.
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/secure_password.rb5
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