Method: MongoModel::DocumentExtensions::Persistence#update_attributes!

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

#update_attributes!(attributes, options = {}) ⇒ Object

Updates its receiver just like update_attributes but calls save! instead of save, so an exception is raised if the docuemnt is invalid.



61
62
63
64
# File 'lib/mongomodel/document/persistence.rb', line 61

def update_attributes!(attributes, options={})
  self.assign_attributes(attributes, options)
  save!
end