method

delete

delete()
public

Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted).

Unlike #destroy, this method doesn’t run any before_delete and after_delete callbacks, nor will it enforce any association :dependent rules.

In addition to deleting this record, any defined before_delete and after_delete callbacks are run, and :dependent rules defined on associations are run.