aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2013-04-02 12:24:21 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2013-04-02 12:24:21 -0700
commit4ae089b661a78180bb978a34d294e8a9e076f652 (patch)
treed646923ce6d6acf47a96805dd0f6580d1f8625a5 /activerecord/lib/active_record/associations.rb
parentdefb5a2f5ab16a0ec5a791a998d5427ded7ac26c (diff)
parent04cda1848cb847c2bdad0bfc12160dc8d5547775 (diff)
downloadrails-4ae089b661a78180bb978a34d294e8a9e076f652.tar.gz
rails-4ae089b661a78180bb978a34d294e8a9e076f652.tar.bz2
rails-4ae089b661a78180bb978a34d294e8a9e076f652.zip
Merge pull request #10054 from rubys/use_find_by_in_rdoc
Prefer find_by over dynamic finders in rdoc
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 4fd817bd8c..3c92e379f1 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -988,7 +988,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.
#