scinote-web/app/serializers/api/v1/connection_serializer.rb

17 lines
451 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Api
module V1
class ConnectionSerializer < ActiveModel::Serializer
type :connections
attributes :id
belongs_to :from, key: :input_task,
serializer: TaskSerializer,
class_name: 'MyModule'
belongs_to :to, key: :output_task,
serializer: TaskSerializer,
class_name: 'MyModule'
end
end
end