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

Remove unneeded association.respond_to?(:reset_scope)

Since 86390c3 all associations have `reset_scope` so `respond_to?` is
unneeded.
This commit is contained in:
Ryuta Kamizono 2017-05-17 11:58:44 +09:00
parent 0714251b2d
commit 61fc1538c9

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