lib/mongoid/commands/delete.rb in mongoid-0.10.4 vs lib/mongoid/commands/delete.rb in mongoid-0.10.5
- old
+ new
@@ -1,15 +1,16 @@
# encoding: utf-8
module Mongoid #:nodoc:
module Commands
class Delete
+ extend Deletion
# 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)
+ delete(doc)
end
end
end
end