Closed devonpmack closed 5 years ago
Was trying to parse prices from amazon in Canada and they use CDN instead of CAD as the identifier.
To reproduce: "CDN$ 5.00".to_money Result: Monetize::ParseError Exception: Unknown currency 'cdn'
"CDN$ 5.00".to_money
Monetize::ParseError Exception: Unknown currency 'cdn'
What is CDN? It's not listed as part of the ISO 4217. You can alway define your own currency with Money::Currency.register
Money::Currency.register
Thanks!
Was trying to parse prices from amazon in Canada and they use CDN instead of CAD as the identifier.
To reproduce:
"CDN$ 5.00".to_money
Result:Monetize::ParseError Exception: Unknown currency 'cdn'