lib/csv_importer/config.rb in csv-importer-0.4.0 vs lib/csv_importer/config.rb in csv-importer-0.5.0
- old
+ new
@@ -3,11 +3,11 @@
class Config
include Virtus.model
attribute :model
attribute :column_definitions, Array[ColumnDefinition], default: proc { [] }
- attribute :identifiers, Array[Symbol], default: []
+ attribute :identifiers # Array[Symbol] or Proc
attribute :when_invalid, Symbol, default: proc { :skip }
attribute :after_build_blocks, Array[Proc], default: []
attribute :after_save_blocks, Array[Proc], default: []
def initialize_copy(orig)
@@ -25,6 +25,5 @@
def after_save(block)
self.after_save_blocks << block
end
end
end
-