2017-09-22 23:57:23 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class REST::CustomEmojiSerializer < ActiveModel::Serializer
|
|
|
|
include RoutingHelper
|
|
|
|
|
2017-10-05 21:41:47 +00:00
|
|
|
attributes :shortcode, :url, :static_url
|
2017-09-22 23:57:23 +00:00
|
|
|
|
|
|
|
def url
|
|
|
|
full_asset_url(object.image.url)
|
|
|
|
end
|
2017-10-05 21:41:47 +00:00
|
|
|
|
|
|
|
def static_url
|
|
|
|
full_asset_url(object.image.url(:static))
|
|
|
|
end
|
2017-09-22 23:57:23 +00:00
|
|
|
end
|