mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 06:33:07 +08:00

This could be catastrophic in production; a missing upload would mean every request to the site would raise an error.
11 lines
207 B
Ruby
11 lines
207 B
Ruby
# frozen_string_literal: true
|
|
|
|
class EmojiSerializer < ApplicationSerializer
|
|
attributes :name, :url, :group
|
|
|
|
def url
|
|
return nil if object.url.blank?
|
|
Discourse.store.cdn_url(object.url)
|
|
end
|
|
end
|