Module Mongoid::Persistence::Deletion
In: lib/mongoid/persistence/deletion.rb

Contains common logic for delete operations.

Methods

prepare  

Public Instance methods

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

@example Execute common delete logic.

  prepare do |doc|
    collection.remove({ :_id => "value })
  end

@param [ Proc ] block The block to call.

@return [ true ] Always true.

@since 2.1.0

[Validate]