2019-09-09 04:50:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class REST::FeaturedTagSerializer < ActiveModel::Serializer
|
2020-12-23 10:43:38 -05:00
|
|
|
include RoutingHelper
|
|
|
|
|
|
|
|
attributes :id, :name, :url, :statuses_count, :last_status_at
|
2019-09-09 04:50:33 -04:00
|
|
|
|
|
|
|
def id
|
|
|
|
object.id.to_s
|
|
|
|
end
|
2020-12-23 10:43:38 -05:00
|
|
|
|
|
|
|
def url
|
|
|
|
short_account_tag_url(object.account, object.tag)
|
|
|
|
end
|
2022-07-13 09:03:28 -04:00
|
|
|
|
|
|
|
def name
|
|
|
|
object.display_name
|
|
|
|
end
|
2019-09-09 04:50:33 -04:00
|
|
|
end
|