Method: DataMapper::Adapters::AbstractAdapter#update

Defined in:
lib/dm-core/adapters/abstract_adapter.rb

#update(attributes, collection) ⇒ Integer

Updates one or many existing resources

Adapters provide specific implementation of this method

Examples:

adapter.update(attributes, collection)  # => 1

Parameters:

  • hash of attribute values to set, keyed by Property

  • collection of records to be updated

Returns:

  • the number of records updated

Raises:

API:

  • semipublic



133
134
135
# File 'lib/dm-core/adapters/abstract_adapter.rb', line 133

def update(attributes, collection)
  raise NotImplementedError, "#{self.class}#update not implemented"
end