Sha256: 17d8be4c0404057faf1e80bf13a90c00cb8bda36db7e8aa1096679e6370acf87
Contents?: true
Size: 380 Bytes
Versions: 19
Compression:
Stored size: 380 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc module Commands #:nodoc module Deletion #:nodoc # If the +Document+ has a parent, delete it from the parent's attributes, # otherwise delete it from it's collection. def delete(doc) parent = doc._parent parent ? parent.remove(doc) : doc.collection.remove(:_id => doc.id) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems