aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-05-17 13:50:49 -0400
committerGitHub <noreply@github.com>2017-05-17 13:50:49 -0400
commite4bfa22cee25c43d88d895926cdeed79c54a761f (patch)
tree0422241a1658aa1cc2eba0c23ca3569919e20f6d /activerecord/lib/active_record
parent3bf10832a8bde3827025cac5f15fd7cc001e8749 (diff)
parent61fc1538c9f88acf07a1d937af15fc4414648853 (diff)
downloadrails-e4bfa22cee25c43d88d895926cdeed79c54a761f.tar.gz
rails-e4bfa22cee25c43d88d895926cdeed79c54a761f.tar.bz2
rails-e4bfa22cee25c43d88d895926cdeed79c54a761f.zip
Merge pull request #29118 from kamipo/remove_respond_to_reset_scope
Remove unneeded `association.respond_to?(:reset_scope)`
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/autosave_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb
index 607c54e481..ebe92e7878 100644
--- a/activerecord/lib/active_record/autosave_association.rb
+++ b/activerecord/lib/active_record/autosave_association.rb
@@ -389,7 +389,7 @@ module ActiveRecord
autosave = reflection.options[:autosave]
# reconstruct the scope now that we know the owner's id
- association.reset_scope if association.respond_to?(:reset_scope)
+ association.reset_scope
if records = associated_records_to_validate_or_save(association, @new_record_before_save, autosave)
if autosave