Merge pull request #3125 from gschlager/bugfix_01
FIX: Loading of Emoji files depended on working directory
This commit is contained in:
commit
78a7fb4b07
|
@ -65,7 +65,7 @@ class Emoji
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.db_file
|
def self.db_file
|
||||||
"lib/emoji/db.json"
|
"#{Rails.root}/lib/emoji/db.json"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.load_standard
|
def self.load_standard
|
||||||
|
|
|
@ -75,14 +75,14 @@ module PrettyText
|
||||||
"app/assets/javascripts/discourse/lib/markdown.js"
|
"app/assets/javascripts/discourse/lib/markdown.js"
|
||||||
)
|
)
|
||||||
|
|
||||||
Dir["#{Rails.root}/app/assets/javascripts/discourse/dialects/**.js"].sort.each do |dialect|
|
Dir["#{app_root}/app/assets/javascripts/discourse/dialects/**.js"].sort.each do |dialect|
|
||||||
unless dialect =~ /\/dialect\.js$/
|
unless dialect =~ /\/dialect\.js$/
|
||||||
ctx.load(dialect)
|
ctx.load(dialect)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# custom emojis
|
# custom emojis
|
||||||
emoji = ERB.new(File.read("app/assets/javascripts/discourse/lib/emoji/emoji.js.erb"))
|
emoji = ERB.new(File.read("#{app_root}/app/assets/javascripts/discourse/lib/emoji/emoji.js.erb"))
|
||||||
ctx.eval(emoji.result)
|
ctx.eval(emoji.result)
|
||||||
|
|
||||||
Emoji.custom.each do |emoji|
|
Emoji.custom.each do |emoji|
|
||||||
|
|
Loading…
Reference in New Issue