Class: RecordLoader::BarcodePrinterTypeLoader

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

Overview

Creates the specified barcode printer types if they are not present

Instance Method Summary collapse

Instance Method Details

#create_or_update!(name, options) ⇒ Object


13
14
15
# File 'lib/record_loader/barcode_printer_type_loader.rb', line 13

def create_or_update!(name, options)
  BarcodePrinterType.create_with(options).find_or_create_by!(name: name)
end