Method: ActiveRecord::Associations::CollectionAssociation#destroy
- Defined in:
- activerecord/lib/active_record/associations/collection_association.rb
#destroy(*records) ⇒ Object
Deletes the records and removes them from this association calling before_remove, after_remove, before_destroy and after_destroy callbacks.
Note that this method removes records from the database ignoring the :dependent option.
195 196 197 |
# File 'activerecord/lib/active_record/associations/collection_association.rb', line 195 def destroy(*records) delete_or_destroy(records, :destroy) end |