Class: RecordLoader::TagGroupAdapterTypeLoader

Inherits:
Base
  • Object
show all
Defined in:
lib/record_loader/tag_group_adapter_type_loader.rb

Overview

Creates the specified adapter types if they are not present

Constant Summary

Constants inherited from Base

Base::BASE_CONFIG_PATH, Base::EXTENSION

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from RecordLoader::Base

Instance Method Details

#create!Object


8
9
10
11
12
13
14
# File 'lib/record_loader/tag_group_adapter_type_loader.rb', line 8

def create!
  ActiveRecord::Base.transaction do
    @config.each do |name, _options|
      TagGroup::AdapterType.find_or_create_by!(name: name)
    end
  end
end