forked from asonix/mastodon
* Update featured_tags_controller.rb * Update featured_tag_serializer.rb * Update featured_tag_serializer.rb * Delete account_featured_tag_serializer.rb * please codeclimate * please codeclimate
15 lines
290 B
Ruby
15 lines
290 B
Ruby
# frozen_string_literal: true
|
|
|
|
class REST::FeaturedTagSerializer < ActiveModel::Serializer
|
|
include RoutingHelper
|
|
|
|
attributes :id, :name, :url, :statuses_count, :last_status_at
|
|
|
|
def id
|
|
object.id.to_s
|
|
end
|
|
|
|
def url
|
|
short_account_tag_url(object.account, object.tag)
|
|
end
|
|
end
|