diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-18 05:06:42 -0800 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-18 05:06:42 -0800 |
commit | 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a (patch) | |
tree | d0b3307df008377ba4b0449866d45c1a66556991 /activerecord/lib/active_record/autosave_association.rb | |
parent | 5937bd02dee112646469848d7fe8a8bfcef5b4c1 (diff) | |
parent | 7baecc48028e2d0cb57936ad10b9102ed129c9f9 (diff) | |
download | rails-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/autosave_association.rb')
-rw-r--r-- | activerecord/lib/active_record/autosave_association.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index 704998301c..a1e229adb9 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -62,14 +62,14 @@ module ActiveRecord # Note that the model is _not_ yet removed from the database: # # id = post.author.id - # Author.find_by_id(id).nil? # => false + # Author.find_by(id: id).nil? # => false # # post.save # post.reload.author # => nil # # Now it _is_ removed from the database: # - # Author.find_by_id(id).nil? # => true + # Author.find_by(id: id).nil? # => true # # === One-to-many Example # @@ -113,14 +113,14 @@ module ActiveRecord # Note that the model is _not_ yet removed from the database: # # id = post.comments.last.id - # Comment.find_by_id(id).nil? # => false + # Comment.find_by(id: id).nil? # => false # # post.save # post.reload.comments.length # => 1 # # Now it _is_ removed from the database: # - # Comment.find_by_id(id).nil? # => true + # Comment.find_by(id: id).nil? # => true module AutosaveAssociation extend ActiveSupport::Concern |