diff options
author | robertomiranda <rjmaltamar@gmail.com> | 2013-01-18 07:56:05 -0500 |
---|---|---|
committer | robertomiranda <rjmaltamar@gmail.com> | 2013-01-18 07:56:05 -0500 |
commit | 7baecc48028e2d0cb57936ad10b9102ed129c9f9 (patch) | |
tree | 77e65e64c592e9f75cb849f851eb4dedb376c2e1 /activerecord/lib/active_record/associations.rb | |
parent | 4095c08729a188e6ebc24f86d60a10bc01053d9b (diff) | |
download | rails-7baecc48028e2d0cb57936ad10b9102ed129c9f9.tar.gz rails-7baecc48028e2d0cb57936ad10b9102ed129c9f9.tar.bz2 rails-7baecc48028e2d0cb57936ad10b9102ed129c9f9.zip |
User Rails 4 find_by
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
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. # |