Sha256: da8f831b53a80b59ebb8ed02b3cb06a7df6b157d40d46f5727ea1af835eaaa0a
Contents?: true
Size: 832 Bytes
Versions: 188
Compression:
Stored size: 832 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Persistence #:nodoc: module Operations #:nodoc: # Remove is a persistence command responsible for deleting a document from # the database. # # The underlying query resembles the following MongoDB query: # # collection.remove( # { "_id" : 1 }, # false # ); class Remove include Deletion, Operations # Remove the document from the database: delegates to the MongoDB # collection remove method. # # @example Remove the document. # Remove.persist # # @return [ true ] Always true. def persist prepare do |doc| collection.remove({ :_id => doc.id }, options) end end end end end end
Version data entries
188 entries across 96 versions & 4 rubygems