Skip to content

Commit

Permalink
Merge pull request #29118 from kamipo/remove_respond_to_reset_scope
Browse files Browse the repository at this point in the history
Remove unneeded `association.respond_to?(:reset_scope)`
  • Loading branch information
rafaelfranca committed May 17, 2017
2 parents 3bf1083 + 61fc153 commit e4bfa22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/autosave_association.rb
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def save_collection_association(reflection)
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
Expand Down

0 comments on commit e4bfa22

Please sign in to comment.