activerecord/lib/active_record/associations/collection_association.rb
# Removes +records+ from this association calling +before_remove+ and
# +after_remove+ callbacks.
#
# This method is abstract in the sense that +delete_records+ has to be
# provided by descendants. Note this method does not imply the records
# are actually removed from the database, that depends precisely on
# +delete_records+. They are in any case removed from the collection.


This method is abstract in the sense that +delete_records+ has to be
provided by descendants. Note this method does not imply the records
are actually removed from the database, that depends precisely on
+delete_records+. They are in any case removed from the collection.
This method is abstract in the sense that + delete_records + has to be provided by descendants . Note this method does not imply the records are actually removed from the database that depends precisely on + 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?(Fixnum) || record.kind_of?(String) }
        delete_or_destroy(records, dependent)
      end
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? ( Fixnum ) || record . kind_of? ( String ) } delete_or_destroy ( records , dependent ) end
Removes +records+ from this association calling +before_remove+ and
+after_remove+ callbacks.
Removes + records + from this association calling + before_remove + and + after_remove + callbacks .
records
<not_specific>