aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2013-01-18 09:15:19 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2013-01-18 09:15:19 -0500
commit8aebe30ef4d3d169bfb0900f4f4b396b74c8d20a (patch)
tree9406b572ea9d9fadcfabca94084834e1188f8c25 /activemodel
parent637a7d9d357a0f3f725b0548282ca8c5e7d4af4a (diff)
downloadrails-8aebe30ef4d3d169bfb0900f4f4b396b74c8d20a.tar.gz
rails-8aebe30ef4d3d169bfb0900f4f4b396b74c8d20a.tar.bz2
rails-8aebe30ef4d3d169bfb0900f4f4b396b74c8d20a.zip
Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by"
This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/dirty.rb2
-rw-r--r--activemodel/lib/active_model/secure_password.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb
index 789bdd74bf..6e67cd2285 100644
--- a/activemodel/lib/active_model/dirty.rb
+++ b/activemodel/lib/active_model/dirty.rb
@@ -46,7 +46,7 @@ module ActiveModel
#
# A newly instantiated object is unchanged:
#
- # person = Person.find_by(name: 'Uncle Bob')
+ # person = Person.find_by_name('Uncle Bob')
# person.changed? # => false
#
# Change the name:
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index 762716a343..6644b60609 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)