But in the latest version (5.15.3), we get this error:
> money = Money.new!("1234.567", :CAD)
Money.new(:CAD, "1234.567")
> Money.to_string(money, format: "#,##0.###;-#,##0.###", locale: :en)
** (ArgumentError) you attempted to apply a function named :symbol_count on 1. If you are using Kernel.apply/3, make sure the module is an atom. If you are using the dot syntax, such as map.field or module.function(), make sure the left side of the dot is an atom or a map
:erlang.apply(1, :symbol_count, [])
(ex_cldr_numbers 2.32.3) lib/cldr/number/format/options.ex:757: Cldr.Number.Format.Options.expand_currency_symbol/2
(ex_cldr_numbers 2.32.3) lib/cldr/number/format/options.ex:131: Cldr.Number.Format.Options.validate_options/3
(ex_cldr_numbers 2.32.3) lib/cldr/number.ex:442: Cldr.Number.to_string/3
This is our Cldr module:
defmodule MyApp.Cldr do
@moduledoc false
use Cldr,
locales: ["en", "fr"],
default_locale: "en",
providers: [Cldr.Number]
end
Hi Kip,
We are migrating our app to the latest version of
ex_money
and related dependencies:In version 5.12.0 of
ex_money
, we were able to pass a custom format toMoney.to_string()
:But in the latest version (5.15.3), we get this error:
This is our Cldr module: