Sha256: 8fb83b4fe986c76517e19588a71dca8f178e7d6401fc0c0e4220ea77f6aa1b33
Contents?: true
Size: 494 Bytes
Versions: 38
Compression:
Stored size: 494 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Commands class Destroy extend Deletion # Performs a destroy of the supplied +Document+, with the necessary # callbacks. It then deletes the record from the collection. # # Options: # # doc: A new +Document+ that is going to be destroyed. def self.execute(doc) doc.run_callbacks :before_destroy delete(doc) doc.run_callbacks :after_destroy end end end end
Version data entries
38 entries across 38 versions & 1 rubygems