diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-17 11:58:44 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-17 11:58:44 +0900 |
commit | 61fc1538c9f88acf07a1d937af15fc4414648853 (patch) | |
tree | 7911a3741c63631af1ace38f01e245e493fc0184 | |
parent | 0714251b2d0d422dc3ffc852eeb604281195b0c2 (diff) | |
download | rails-61fc1538c9f88acf07a1d937af15fc4414648853.tar.gz rails-61fc1538c9f88acf07a1d937af15fc4414648853.tar.bz2 rails-61fc1538c9f88acf07a1d937af15fc4414648853.zip |
Remove unneeded `association.respond_to?(:reset_scope)`
Since 86390c3 all associations have `reset_scope` so `respond_to?` is
unneeded.
-rw-r--r-- | activerecord/lib/active_record/autosave_association.rb | 2 |
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 |