Module Mongoid::Persistence::Modification
In: lib/mongoid/persistence/modification.rb

Contains common logic for modification operations.

Methods

prepare  

Public Instance methods

Wrap all the common modification logic for both root and embedded documents and then yield to the block.

@example Execute common modification logic.

  prepare do |doc|
    collection.update({ :_id => 1 }, { :field => "value })
  end

@param [ Proc ] block The block to call.

@return [ true, false ] If the save passed or not.

@since 2.1.0

[Validate]