summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2016-12-04 03:40:33 +0000
committerLuke "Jared" Bennett <lbennett@gitlab.com>2016-12-04 03:40:33 +0000
commit0a94700c8a9c4a24a9f851a9aeb72926864bd436 (patch)
tree316cbe5351396d6a6498da78bb52658005b16ab7
parentb1a3dbe5cae4df4f89ffb3f55dbd5323d4e2a062 (diff)
downloadgitlab-ce-21443-reorder-emoji-following-standard-order.tar.gz
-rw-r--r--lib/gitlab/award_emoji.rb20
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/gitlab/award_emoji.rb b/lib/gitlab/award_emoji.rb
index 39b43ab5489..43562a9a216 100644
--- a/lib/gitlab/award_emoji.rb
+++ b/lib/gitlab/award_emoji.rb
@@ -29,11 +29,9 @@ module Gitlab
@emoji_by_category[category] << data
end
-
- @emoji_by_category = @emoji_by_category.sort.to_h
end
- @emoji_by_category
+ @emoji_by_category = sort_emoji_by_category
end
def self.emojis
@@ -52,6 +50,22 @@ module Gitlab
end
end
+ def self.sort_emoji_by_category
+ sorted_emoji_by_category = {}
+ [
+ 'people',
+ 'nature',
+ 'travel',
+ 'activity',
+ 'objects',
+ 'symbols',
+ 'flags'
+ ].each do |category|
+ sorted_emoji_by_category[category] = @emoji_by_category[category]
+ end
+ sorted_emoji_by_category
+ end
+
# Returns an Array of Emoji names and their asset URLs.
def self.urls
@urls ||= begin