You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
307 B
20 lines
307 B
4 years ago
|
# 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
|