mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
This could be catastrophic in production; a missing upload would mean every request to the site would raise an error.
10 lines
207 B
Ruby
10 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
|