module ActiveRecord::Persistence
def delete
callbacks or any :dependent association
To enforce the object's +before_destroy+ and +after_destroy+
Note that this will also delete records marked as {#readonly?}[rdoc-ref:Core#readonly?].
record's primary key, and no callbacks are executed.
The row is simply removed with an SQL +DELETE+ statement on the
persisted). Returns the frozen instance.
reflect that no changes should be made (since they can't be
Deletes the record in the database and freezes this instance to
def delete _delete_row if persisted? @destroyed = true @previously_new_record = false freeze end