mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 12:16:06 +08:00
16 lines
359 B
Ruby
16 lines
359 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module V1
|
|
class ProjectSerializer < ActiveModel::Serializer
|
|
type :projects
|
|
attributes :name, :visibility, :start_date, :archived
|
|
|
|
belongs_to :project_folder, serializer: ProjectFolderSerializer
|
|
|
|
def start_date
|
|
I18n.l(object.created_at, format: :full)
|
|
end
|
|
end
|
|
end
|
|
end
|