mirror of
https://github.com/discourse/discourse.git
synced 2025-06-21 00:45:26 +08:00

This commit moves most of emoji logic into the discourse-emojis gem: https://github.com/discourse/discourse-emojis/ Most notably: - images are now symlinked from the gem - the gem provides path to the json files Search aliases have also been made asynchronous and memoized. When you will search for an emoji we will now load the aliases and store the list for future use. --------- Co-authored-by: David Taylor <david@taylorhq.com>
13 lines
267 B
Ruby
13 lines
267 B
Ruby
# frozen_string_literal: true
|
|
|
|
class EmojisController < ApplicationController
|
|
def index
|
|
emojis = Emoji.allowed.group_by(&:group)
|
|
render json: MultiJson.dump(emojis)
|
|
end
|
|
|
|
def search_aliases
|
|
render json: MultiJson.dump(Emoji.search_aliases)
|
|
end
|
|
end
|