Module: Importer::Adapters::ActiveRecordAdapter::InstanceMethods

Defined in:
lib/importer/adapters/active_record_adapter.rb

Instance Method Summary collapse

Instance Method Details

#merge_attributes_on_import(import, attributes) ⇒ Object

Merges attributes of a detected object with current object’s ones. By default it simply assigns detected attributes to the object. Override this method in your model to provide some more sophisticated behavior.

  • import - current import

  • attributes - detected object’s attributes hash



97
98
99
# File 'lib/importer/adapters/active_record_adapter.rb', line 97

def merge_attributes_on_import(import, attributes)
  self.attributes = attributes
end