summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-10-05 07:13:21 -0700
committerNihad Abbasov <narkoz.2008@gmail.com>2012-10-05 07:23:58 -0700
commit317c928198aac43d4e00d1645318a373a33974cf (patch)
tree0eaac17c2f82696f5b8ddd77b6ba26f1b6fbf497 /config
parent9e4f3147a0f4b352ba243a03f76daade3dcee056 (diff)
downloadgitlab-ce-317c928198aac43d4e00d1645318a373a33974cf.tar.gz
improve emoji checking performance
Diffstat (limited to 'config')
-rw-r--r--config/initializers/emoji.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/initializers/emoji.rb b/config/initializers/emoji.rb
new file mode 100644
index 00000000000..dbd2a4e2cf5
--- /dev/null
+++ b/config/initializers/emoji.rb
@@ -0,0 +1,4 @@
+module Emoji
+ path = "#{Rails.root}/vendor/assets/images/emoji"
+ NAMES = Dir["#{path}/*.png"].sort.map {|f| File.basename(f, '.png')}
+end