about summary refs log tree commit diff
path: root/app/serializers/rest/account_featured_tag_serializer.rb
blob: 84bef2e629728574b04b115dfdb1ca0a4c71947d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class REST::AccountFeaturedTagSerializer < ActiveModel::Serializer
  include RoutingHelper

  attributes :id, :name, :url

  def id
    object.tag.id.to_s
  end

  def url
    short_account_tag_url(object.account, object.tag)
  end
end