Sha256: 844d2e57c1800a4e6c99fe15714d39b9e7f6bc7df919c207a4dc5cc8222eb6b2
Contents?: true
Size: 519 Bytes
Versions: 13
Compression:
Stored size: 519 Bytes
Contents
# encoding: utf-8 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
13 entries across 13 versions & 1 rubygems