Method: Bulkrax::Importer#import_objects

Defined in:
app/models/bulkrax/importer.rb

#import_objects(types_array = nil) ⇒ Object



210
211
212
213
214
215
216
217
218
# File 'app/models/bulkrax/importer.rb', line 210

def import_objects(types_array = nil)
  self.only_updates ||= false
  self.save if self.new_record? # Object needs to be saved for statuses
  types = types_array || DEFAULT_OBJECT_TYPES
  existing_entries? ? parser.rebuild_entries(types) : parser.create_objects(types)
  mark_unseen_as_skipped
rescue StandardError => e
  set_status_info(e)
end