You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we are in a situation where we want to take advantage of Monetize parser to deal with . and , (ref: #701)
It is worth to report that the order of fields matters because how the parser works
The parser expects that the currency is being already set when parse the amount, and this makes the order of assignment important, creating issues with currencies with a number of decimal points different from 2
Example:
# initializerMonetize.expect_whole_subunits=trueMoneyRails.configuredo |config|
# Should not matter, added just to remove the deprecationsconfig.rounding_mode=BigDecimal::ROUND_HALF_DOWNconfig.locale_backend=:i18nend# ModelclassProduct < ApplicationRecordmonetize:price_centsend
Hello,
we are in a situation where we want to take advantage of
Monetize
parser to deal with.
and,
(ref: #701)It is worth to report that the order of fields matters because how the parser works
The parser expects that the currency is being already set when parse the amount, and this makes the order of assignment important, creating issues with currencies with a number of decimal points different from 2
Example:
Result
Solution
In rails, the order of
permitted_params
will matter, so you want to have something like this:The text was updated successfully, but these errors were encountered: