Method: DataMapper::Resource#update!

Defined in:
lib/dm-core/resource.rb

#update!(attributes) ⇒ Boolean

Updates attributes and saves this Resource instance, bypassing hooks

Parameters:

  • attributes (Hash)

    attributes to be updated

Returns:

  • (Boolean)

    true if resource and storage state match



398
399
400
401
402
# File 'lib/dm-core/resource.rb', line 398

def update!(attributes)
  assert_update_clean_only(:update!)
  self.attributes = attributes
  save!
end