Closed smtlaissezfaire closed 1 year ago
With config setting:
config.default_format = { no_cents_if_whole: true, }
humanized_money doesn't respect the config.default_format.no_cents_if_whole setting.
humanized_money
config.default_format.no_cents_if_whole
The code seems to do this:
options = { no_cents_if_whole: MoneyRails::Configuration.no_cents_if_whole.nil? ? true : MoneyRails::Configuration.no_cents_if_whole, .... }
A hack is setting config.no_cents_if_whole as well as config.default_format.no_cents_if_whole:
config.no_cents_if_whole
NO_CENTS_IF_WHOLE = false config.no_cents_if_whole = NO_CENTS_IF_WHOLE config.default_format = { no_cents_if_whole: NO_CENTS_IF_WHOLE, symbol: nil, sign_before_symbol: nil, }
But this seems like a bug.
I also had this issue and this work-around has got it working for me
With config setting:
humanized_money
doesn't respect theconfig.default_format.no_cents_if_whole
setting.The code seems to do this:
A hack is setting
config.no_cents_if_whole
as well asconfig.default_format.no_cents_if_whole
:But this seems like a bug.