fedibird-fe/app/serializers/activitypub/generator_serializer.rb
2023-02-27 15:05:33 +09:00

24 lines
323 B
Ruby

# frozen_string_literal: true
class ActivityPub::GeneratorSerializer < ActiveModel::Serializer
include RoutingHelper
attributes :id, :type, :name, :url
def id
generator_url(object)
end
def type
'Application'
end
def name
object.name || ''
end
def url
object.website || ''
end
end