Class: HubStore::Insert
- Inherits:
-
Object
- Object
- HubStore::Insert
- Defined in:
- lib/hub_store/insert.rb
Instance Method Summary collapse
-
#initialize(row:, target:) ⇒ Insert
constructor
A new instance of Insert.
- #run ⇒ Object
Constructor Details
#initialize(row:, target:) ⇒ Insert
Returns a new instance of Insert.
3 4 5 6 |
# File 'lib/hub_store/insert.rb', line 3 def initialize(row:, target:) @row = row @target = target end |
Instance Method Details
#run ⇒ Object
8 9 10 11 12 |
# File 'lib/hub_store/insert.rb', line 8 def run record.update! importable_attributes rescue ActiveRecord::RecordNotUnique Rails.logger.warn "Skipping duplicate record ##{row[:id]}" end |