闭社主体 forked from https://github.com/tootsuite/mastodon
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.

15 lines
307 B

  1. # frozen_string_literal: true
  2. class REST::CustomEmojiSerializer < ActiveModel::Serializer
  3. include RoutingHelper
  4. attributes :shortcode, :url, :static_url, :visible_in_picker
  5. def url
  6. full_asset_url(object.image.url)
  7. end
  8. def static_url
  9. full_asset_url(object.image.url(:static))
  10. end
  11. end