featured_tag_serializer.rb 290 B

123456789101112131415
  1. # frozen_string_literal: true
  2. class REST::FeaturedTagSerializer < ActiveModel::Serializer
  3. include RoutingHelper
  4. attributes :id, :name, :url, :statuses_count, :last_status_at
  5. def id
  6. object.id.to_s
  7. end
  8. def url
  9. short_account_tag_url(object.account, object.tag)
  10. end
  11. end