mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32: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
|