Method: CouchbaseOrm::Persistence#update!
- Defined in:
- lib/couchbase-orm/persistence.rb
#update!(hash) ⇒ Object Also known as: update_attributes!
Updates its receiver just like #update but calls #save! instead of save, so an exception is raised if the record is invalid and saving will fail.
171 172 173 174 |
# File 'lib/couchbase-orm/persistence.rb', line 171 def update!(hash) assign_attributes(hash) # Assign attributes is provided by ActiveModel::AttributeAssignment save! end |