mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-25 17:36:14 +08:00
14 lines
325 B
Ruby
14 lines
325 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Api
|
||
|
module V1
|
||
|
class UserProjectSerializer < ActiveModel::Serializer
|
||
|
type :user_projects
|
||
|
attributes :id, :role, :user_id, :project_id, :created_at, :updated_at,
|
||
|
:assigned_by_id
|
||
|
|
||
|
belongs_to :project, serializer: ProjectSerializer
|
||
|
end
|
||
|
end
|
||
|
end
|