Class: RecordLoader::UltimaGlobalLoader

Inherits:
ApplicationRecordLoader show all
Defined in:
lib/record_loader/ultima_global_loader.rb

Overview

Creates the specified UltimaGlobal records if they are not present

Instance Method Summary collapse

Methods inherited from ApplicationRecordLoader

#wip_list

Instance Method Details

#create_or_update!(name, options) ⇒ Object



9
10
11
12
# File 'lib/record_loader/ultima_global_loader.rb', line 9

def create_or_update!(name, options)
  name = options['name'] || name # use name from options if provided
  UltimaGlobal.create_with(options).find_or_create_by!(name:)
end