Use string interpolation, to avoid segmentation fault.

The segmentation fault was ocurring when precompiling assets, with ruby2.0.0.
This commit is contained in:
Cyril Rohr 2014-03-26 14:55:40 +00:00
parent 71ba674167
commit 3631ba2eb5
1 changed files with 1 additions and 1 deletions

View File

@ -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