This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/serializers/rest/account_featured_tag_serial...

20 lines
307 B
Ruby

# frozen_string_literal: true
class REST::AccountFeaturedTagSerializer < ActiveModel::Serializer
include RoutingHelper
attributes :id, :name, :url
def id
object.tag.id.to_s
end
def name
"##{object.name}"
end
def url
short_account_tag_url(object.account, object.tag)
end
end