在哪里设置locale_backend以符合money-rails的新变化?

where to set locale_backend to comply with new changes in money-rails?

money-railsgem会抛出如下警告

 [DEPRECATION] You are using the default localization behaviour that will change in the next major release. Find out more - https://github.com/RubyMoney/money#deprecation

文档说要设置:

 Money.locale_backend = :i18n

并且,添加:

en:
  number:
    currency:
      format:
      delimiter: ","
      separator: "."

# falling back to
number:
  format:
    delimiter: ","
    separator: "."

更新 en.yml 文件是不言自明的。但是,文档不清楚在哪里设置 Money.locale_backend = :i18n.

这应该在新的初始化程序中吗?

可以在config/initializers/money.rb

中设置