Class: RailsWorkflow::OperationTemplateSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/rails_workflow/operation_template_serializer.rb

Instance Method Summary collapse

Instance Method Details

#child_processObject



7
8
9
# File 'app/serializers/rails_workflow/operation_template_serializer.rb', line 7

def child_process
  object.child_process.try(:uuid)
end

#dependenciesObject



11
12
13
14
15
16
# File 'app/serializers/rails_workflow/operation_template_serializer.rb', line 11

def dependencies
  object.dependencies.each do |d|
    d['uuid'] = OperationTemplate.find(d['id']).uuid
    d.delete("id")
  end
end

#operation_classObject



18
19
20
# File 'app/serializers/rails_workflow/operation_template_serializer.rb', line 18

def operation_class
  object.read_attribute :operation_class
end