Class: Zizia::CsvImportDetail

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/zizia/csv_import_detail.rb

Instance Method Summary collapse

Instance Method Details

#set_defaultsObject


21
22
23
24
# File 'app/models/zizia/csv_import_detail.rb', line 21

def set_defaults
  self.success_count = 0
  self.failure_count = 0
end

#statusObject


12
13
14
# File 'app/models/zizia/csv_import_detail.rb', line 12

def status
  'undetermined'
end

#total_sizeObject


16
17
18
19
# File 'app/models/zizia/csv_import_detail.rb', line 16

def total_size
  return 0 if pre_ingest_files.empty?
  pre_ingest_files.map(&:size).sum
end