src code

class method ActiveRecord.Model.destroy

ActiveRecord.Model.destroy(id) → Boolean | String

Deletes a given id (if it exists) calling any callbacks or validations on the record. If "all" is passed as the ids, all records will be found and destroyed.