Sha256: 4d41edf1f4554abcde0241e6f209d694ab4f9bd9871b512830be54c4f8babfbf
Contents?: true
Size: 611 Bytes
Versions: 1
Compression:
Stored size: 611 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Persistence #:nodoc: # Mixin for common functionality for all persistence commands. module Command attr_reader :collection, :document, :options, :validate # Initialize the persistence +Command+. # # Options: # # document: The +Document+ to be persisted. # validate: Is the document to be validated. def init(document, validate) @collection = document.embedded ? document._root.collection : document.collection @document = document @validate = validate end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid-pre-2.0.0.beta1 | lib/mongoid/persistence/command.rb |