diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-09-11 06:38:46 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-10-29 16:38:29 +0900 |
commit | 5f9051c3412c634898fc304297f8871a63ad4f0f (patch) | |
tree | de2d888d4960461ac8c6d8dc4eaae88f1ce706ce /activerecord | |
parent | fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2 (diff) | |
download | rails-5f9051c3412c634898fc304297f8871a63ad4f0f.tar.gz rails-5f9051c3412c634898fc304297f8871a63ad4f0f.tar.bz2 rails-5f9051c3412c634898fc304297f8871a63ad4f0f.zip |
Remove unused internal `:dependent` option in `CollectionAssociation#delete`
The internal `:dependent` option was introduced at #10604.
But currently unused.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 278c95e27b..358f0d4497 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -192,11 +192,8 @@ module ActiveRecord # +delete_records+. They are in any case removed from the collection. def delete(*records) return if records.empty? - _options = records.extract_options! - dependent = _options[:dependent] || options[:dependent] - records = find(records) if records.any? { |record| record.kind_of?(Integer) || record.kind_of?(String) } - delete_or_destroy(records, dependent) + delete_or_destroy(records, options[:dependent]) end # Deletes the +records+ and removes them from this association calling |