aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/secure_password.rb
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2013-01-18 05:06:42 -0800
committerGuillermo Iguaran <guilleiguaran@gmail.com>2013-01-18 05:06:42 -0800
commit637a7d9d357a0f3f725b0548282ca8c5e7d4af4a (patch)
treed0b3307df008377ba4b0449866d45c1a66556991 /activemodel/lib/active_model/secure_password.rb
parent5937bd02dee112646469848d7fe8a8bfcef5b4c1 (diff)
parent7baecc48028e2d0cb57936ad10b9102ed129c9f9 (diff)
downloadrails-637a7d9d357a0f3f725b0548282ca8c5e7d4af4a.tar.gz
rails-637a7d9d357a0f3f725b0548282ca8c5e7d4af4a.tar.bz2
rails-637a7d9d357a0f3f725b0548282ca8c5e7d4af4a.zip
Merge pull request #8989 from robertomiranda/use-rails-4-find-by
Replace deprecated find_by_* with find_by
Diffstat (limited to 'activemodel/lib/active_model/secure_password.rb')
-rw-r--r--activemodel/lib/active_model/secure_password.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index 6644b60609..762716a343 100644
--- a/activemodel/lib/active_model/secure_password.rb
+++ b/activemodel/lib/active_model/secure_password.rb
@@ -37,8 +37,8 @@ module ActiveModel
# user.save # => true
# user.authenticate('notright') # => false
# user.authenticate('mUc3m00RsqyRe') # => user
- # User.find_by_name('david').try(:authenticate, 'notright') # => false
- # User.find_by_name('david').try(:authenticate, 'mUc3m00RsqyRe') # => user
+ # User.find_by(name: 'david').try(:authenticate, 'notright') # => false
+ # User.find_by(name: 'david').try(:authenticate, 'mUc3m00RsqyRe') # => user
def has_secure_password(options = {})
# Load bcrypt-ruby only when has_secure_password is used.
# This is to avoid ActiveModel (and by extension the entire framework)