discourse/app/serializers/emoji_serializer.rb
benj cfc23c43e9
FEATURE - Add username column to custom emoji table (#29522)
* Adds emoji column for creator username
2024-11-01 10:32:59 -05:00

15 lines
266 B
Ruby

# frozen_string_literal: true
class EmojiSerializer < ApplicationSerializer
attributes :name, :url, :group, :created_by
def created_by
object.created_by
end
def url
return nil if object.url.blank?
Discourse.store.cdn_url(object.url)
end
end