Sha256: 38d1f2f2bb4ee8e025dc323d9637851302e0cdcb93e12428f8f8f4a922205bb9
Contents?: true
Size: 501 Bytes
Versions: 55
Compression:
Stored size: 501 Bytes
Contents
module Mongoid #:nodoc: module Commands class Create # Performs a create of the supplied Document, with the necessary # callbacks. It then delegates to the Save command. # # Options: # # doc: A new +Document+ that is going to be persisted. # # Returns: +Document+. def self.execute(doc) doc.run_callbacks :before_create Save.execute(doc) doc.run_callbacks :after_create return doc end end end end
Version data entries
55 entries across 55 versions & 1 rubygems