diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-22 17:01:53 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-04-22 17:01:53 +0100 |
commit | 319c9360551280f7345c5d16ffb34fe5e73a1598 (patch) | |
tree | 90668f844ad4310aa738146e0996262cd14fb073 /lib | |
parent | d5398e9656c1174d4d5be5a8cdad2a26d7587a27 (diff) | |
download | gitlab-ce-319c9360551280f7345c5d16ffb34fe5e73a1598.tar.gz |
Fixes issue with emoji comments not showing correct emoji image
Previously it would look for the unicode character inside the award menu. But this menu might not always be there.
Now, the unicode characters are loaded onto the page in an array which the award emoji that looks in to get the correct emoji unicode character
Fixes #15512
Diffstat (limited to 'lib')
-rw-r--r-- | lib/award_emoji.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/award_emoji.rb b/lib/award_emoji.rb index 5f8ff01b0a9..ad78bb530f4 100644 --- a/lib/award_emoji.rb +++ b/lib/award_emoji.rb @@ -52,6 +52,11 @@ class AwardEmoji end end + def self.unicode + emojis + emojis.map{|key, value| { key => emojis[key]["unicode"] } }.inject(:merge!) + end + def self.aliases @aliases ||= begin json_path = File.join(Rails.root, 'fixtures', 'emojis', 'aliases.json' ) |