Method: MongoODM::Document::Persistence::InstanceMethods#destroy

Defined in:
lib/mongo_odm/document/persistence.rb

#destroyObject



47
48
49
50
51
52
# File 'lib/mongo_odm/document/persistence.rb', line 47

def destroy
  return false if new_record?
  _run_destroy_callbacks do
    self.class.remove({ :_id => self.id })
  end
end