mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 19:51:01 +08:00
18 lines
485 B
Ruby
18 lines
485 B
Ruby
# 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'
|
|
|
|
include TimestampableModel
|
|
end
|
|
end
|
|
end
|