mastodon/app/serializers/rest/base_collection_serializer.rb
2025-12-09 10:31:35 +00:00

12 lines
334 B
Ruby

# frozen_string_literal: true
class REST::BaseCollectionSerializer < ActiveModel::Serializer
attributes :id, :uri, :name, :description, :local, :sensitive,
:discoverable, :item_count, :created_at, :updated_at
belongs_to :tag, serializer: REST::StatusSerializer::TagSerializer
def id
object.id.to_s
end
end