Sha256: d2f02d0fbaae2a7458b90cfcfac3dcce8eafc96fc11b9fa7548e126d40a1edff

Contents?: true

Size: 329 Bytes

Versions: 55

Compression:

Stored size: 329 Bytes

Contents

module Mongoid #:nodoc:
  module Commands
    class Delete
      # Performs a delete of the supplied +Document+ without any callbacks.
      #
      # Options:
      #
      # doc: A new +Document+ that is going to be deleted.
      def self.execute(doc)
        doc.collection.remove(:_id => doc.id)
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
mongoid-0.7.5 lib/mongoid/commands/delete.rb
mongoid-0.7.4 lib/mongoid/commands/delete.rb
mongoid-0.7.3 lib/mongoid/commands/delete.rb
mongoid-0.7.2 lib/mongoid/commands/delete.rb
mongoid-0.7.1 lib/mongoid/commands/delete.rb
mongoid-0.7.0 lib/mongoid/commands/delete.rb
mongoid-0.6.10 lib/mongoid/commands/delete.rb
mongoid-0.6.9 lib/mongoid/commands/delete.rb
mongoid-0.6.8 lib/mongoid/commands/delete.rb
mongoid-0.6.7 lib/mongoid/commands/delete.rb
mongoid-0.6.6 lib/mongoid/commands/delete.rb
mongoid-0.6.5 lib/mongoid/commands/delete.rb
mongoid-0.6.4 lib/mongoid/commands/delete.rb
mongoid-0.6.3 lib/mongoid/commands/delete.rb
mongoid-0.6.2 lib/mongoid/commands/delete.rb
mongoid-0.6.1 lib/mongoid/commands/delete.rb
mongoid-0.6.0 lib/mongoid/commands/delete.rb
mongoid-0.5.11 lib/mongoid/commands/delete.rb
mongoid-0.5.10 lib/mongoid/commands/delete.rb
mongoid-0.5.9 lib/mongoid/commands/delete.rb