Module | Mongoid::Persistence::Insertion |
In: |
lib/mongoid/persistence/insertion.rb
|
Contains common logic for insertion operations.
Wrap all the common insertion logic for both root and embedded documents and then yield to the block.
@example Execute common insertion logic.
prepare do |doc| collection.insert({ :field => "value }) end
@param [ Proc ] block The block to call.
@return [ Document ] The inserted document.
@since 2.1.0