This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-09-23 01:57:23 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class REST::CustomEmojiSerializer < ActiveModel::Serializer
|
|
|
|
include RoutingHelper
|
|
|
|
|
2017-10-27 16:11:30 +02:00
|
|
|
attributes :shortcode, :url, :static_url, :visible_in_picker
|
2017-09-23 01:57:23 +02:00
|
|
|
|
|
|
|
def url
|
|
|
|
full_asset_url(object.image.url)
|
|
|
|
end
|
2017-10-05 23:41:47 +02:00
|
|
|
|
|
|
|
def static_url
|
|
|
|
full_asset_url(object.image.url(:static))
|
|
|
|
end
|
2017-09-23 01:57:23 +02:00
|
|
|
end
|