fedibird-fe/app/serializers/activitypub/generator_serializer.rb

25 lines
323 B
Ruby
Raw Normal View History

2023-02-15 08:04:19 +00:00
# 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