Class: PrelandsRails::CreateSimpleSource::CreateRecord

Inherits:
Object
  • Object
show all
Includes:
Interactor, Interactor::Contracts, AbstractInteractor, Base
Defined in:
lib/prelands_rails/create_simple_source/create_record.rb

Overview

Создаст/обновит запись ::Preland::SimpleSource

Instance Method Summary collapse

Methods included from AbstractInteractor

#call

Instance Method Details

#actObject



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/prelands_rails/create_simple_source/create_record.rb', line 29

def act
  params = {
    aws_prefix:         context.aws_prefix,
    archive:            context.archive,
    preland_id:         context.preland_id,
    preland_domain_ids: context.preland_domain_ids,
    locales:            context.incoming_locales
  }
  context.preland_simple_source =
    context.model_preland_simple_source.create! params
end