mirror of
https://github.com/discourse/discourse.git
synced 2025-03-20 17:56:40 +08:00
Use string interpolation, to avoid segmentation fault.
The segmentation fault was ocurring when precompiling assets, with ruby2.0.0.
This commit is contained in:
parent
71ba674167
commit
3631ba2eb5
@ -43,7 +43,7 @@ module JsLocaleHelper
|
||||
end
|
||||
|
||||
def self.moment_format_function(name)
|
||||
format = I18n.t("dates." << name)
|
||||
format = I18n.t("dates.#{name}")
|
||||
result = "moment.fn.#{name.camelize(:lower)} = function(){ return this.format('#{format}'); };\n"
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user