mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
16 lines
436 B
Ruby
16 lines
436 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module V1
|
|
class ConnectionSerializer < ActiveModel::Serializer
|
|
type :connections
|
|
attributes :id
|
|
belongs_to :from, key: :from,
|
|
serializer: TaskSerializer,
|
|
class_name: 'MyModule'
|
|
belongs_to :to, key: :to,
|
|
serializer: TaskSerializer,
|
|
class_name: 'MyModule'
|
|
end
|
|
end
|
|
end
|