Class: RecordLoader::PipelineRequestInformationTypeLoader
- Inherits:
-
ApplicationRecordLoader
- Object
- Base
- ApplicationRecordLoader
- RecordLoader::PipelineRequestInformationTypeLoader
- Defined in:
- lib/record_loader/pipeline_request_information_type_loader.rb
Overview
Creates the specified pipeline request information types if they are not present. It requires an existing pipeline name and an existing request information type
Instance Method Summary collapse
Methods inherited from ApplicationRecordLoader
Instance Method Details
#create_or_update!(_name, options) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/record_loader/pipeline_request_information_type_loader.rb', line 13 def create_or_update!(_name, ) pipeline = Pipeline.find_by!(name: ['pipeline_name']) request_information_type = RequestInformationType.find_by!(key: ['request_information_type_key']) PipelineRequestInformationType.create_with(pipeline:, request_information_type:).find_or_create_by!( pipeline:, request_information_type: ) end |