Update Emoji asset path

Now that we're serving assets directly from the Gemojione gem's path,
the images are not in an `emoji/` sub-folder.
This commit is contained in:
Robert Speicher 2016-02-12 15:34:20 -05:00
parent f9bf87bbe8
commit fe13f58f3e
3 changed files with 5 additions and 4 deletions

View File

@ -236,7 +236,7 @@ class ProjectsController < ApplicationController
Emoji.emojis.map do |name, emoji|
{
name: name,
path: view_context.image_url("emoji/#{emoji["unicode"]}.png")
path: view_context.image_url("#{emoji["unicode"]}.png")
}
end
end

View File

@ -43,8 +43,8 @@ module Gitlab
# Enable the asset pipeline
config.assets.enabled = true
config.assets.paths << Emoji.images_path
config.assets.precompile << "emoji/*.png"
config.assets.paths << Gemojione.index.images_path
config.assets.precompile << "*.png"
config.assets.precompile << "print.css"
# Version of your assets, change this if you want to expire all your assets

View File

@ -45,7 +45,8 @@ module Banzai
private
def emoji_url(name)
emoji_path = "emoji/#{emoji_filename(name)}"
emoji_path = emoji_filename(name)
if context[:asset_host]
# Asset host is specified.
url_to_image(emoji_path)