Sha256: 3ffe3f9d5422b798d4030ef9e11e25e11b43fc0641b29a91166577c601225a7c
Contents?: true
Size: 569 Bytes
Versions: 55
Compression:
Stored size: 569 Bytes
Contents
module Mongoid #:nodoc: module Commands class DeleteAll # Performs a delete of the all the +Documents+ that match the criteria # supplied. # # Options: # # params: A set of conditions to find the +Documents+ by. # klass: The class of the +Document+ to execute the find on. # # Example: # # <tt>DeleteAll.execute(Person, :conditions => { :field => "value" })</tt> def self.execute(klass, params) klass.find(:all, params).each { |doc| Delete.execute(doc) } end end end end
Version data entries
55 entries across 55 versions & 1 rubygems