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…
Reference in New Issue