hellion
hellion

Reputation: 4850

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

The money-rails gem will throw the following warning

 [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

The documentation says to set:

 Money.locale_backend = :i18n

And, the add:

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

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

updating the en.yml file is self explanatory. But, the documentation is not clear as to where to set Money.locale_backend = :i18n.

Should this be in a new initializer?

Upvotes: 2

Views: 992

Answers (1)

Mark Merritt
Mark Merritt

Reputation: 2695

You can set it in config/initializers/money.rb

Upvotes: 1

Related Questions