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:
parent
f9bf87bbe8
commit
fe13f58f3e
|
@ -236,7 +236,7 @@ class ProjectsController < ApplicationController
|
||||||
Emoji.emojis.map do |name, emoji|
|
Emoji.emojis.map do |name, emoji|
|
||||||
{
|
{
|
||||||
name: name,
|
name: name,
|
||||||
path: view_context.image_url("emoji/#{emoji["unicode"]}.png")
|
path: view_context.image_url("#{emoji["unicode"]}.png")
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -43,8 +43,8 @@ module Gitlab
|
||||||
|
|
||||||
# Enable the asset pipeline
|
# Enable the asset pipeline
|
||||||
config.assets.enabled = true
|
config.assets.enabled = true
|
||||||
config.assets.paths << Emoji.images_path
|
config.assets.paths << Gemojione.index.images_path
|
||||||
config.assets.precompile << "emoji/*.png"
|
config.assets.precompile << "*.png"
|
||||||
config.assets.precompile << "print.css"
|
config.assets.precompile << "print.css"
|
||||||
|
|
||||||
# Version of your assets, change this if you want to expire all your assets
|
# Version of your assets, change this if you want to expire all your assets
|
||||||
|
|
|
@ -45,7 +45,8 @@ module Banzai
|
||||||
private
|
private
|
||||||
|
|
||||||
def emoji_url(name)
|
def emoji_url(name)
|
||||||
emoji_path = "emoji/#{emoji_filename(name)}"
|
emoji_path = emoji_filename(name)
|
||||||
|
|
||||||
if context[:asset_host]
|
if context[:asset_host]
|
||||||
# Asset host is specified.
|
# Asset host is specified.
|
||||||
url_to_image(emoji_path)
|
url_to_image(emoji_path)
|
||||||
|
|
Loading…
Reference in New Issue