aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.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 /activerecord/lib/active_record/associations.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 'activerecord/lib/active_record/associations.rb')
-rw-r--r--activerecord/lib/active_record/associations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 16a46a59d1..232c0323e6 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -987,7 +987,7 @@ module ActiveRecord
# associated objects themselves. So with +has_and_belongs_to_many+ and +has_many+
# <tt>:through</tt>, the join records will be deleted, but the associated records won't.
#
- # This makes sense if you think about it: if you were to call <tt>post.tags.delete(Tag.find_by_name('food'))</tt>
+ # This makes sense if you think about it: if you were to call <tt>post.tags.delete(Tag.find_by(name: 'food'))</tt>
# you would want the 'food' tag to be unlinked from the post, rather than for the tag itself
# to be removed from the database.
#