1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #29118 from kamipo/remove_respond_to_reset_scope

Remove unneeded `association.respond_to?(:reset_scope)`
This commit is contained in:
Rafael França 2017-05-17 13:50:49 -04:00 committed by GitHub
commit e4bfa22cee

View file

@ -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