Money v6.6.0 Release Notes
-
- Fixed VariableExchange#exchange_with for big numbers.
- Add Currency symbol translation support
Currency.all
raises a more helpful error message (Currency::MissingAttributeError
)if a currency has no priorityCurrency
implementsEnumerable
.Currency#<=>
sorts alphabetically byid
if thepriority
s are the same, and no longer raises an error if one of the priorities is missing.Money::Currency.unregister
can take an ISO code argument in addition to a hash.Money::Currency.unregister
returnstrue
if the given currency previously existed, andfalse
if it didn't.- Fix symbol for SZL currency
- Trying to create a Currency without an
iso_code
now raises a more helpful error message. - Add
Money.usd
,.cad
and.eur
as aliases for.us_dollar
,.ca_dollar
, and.euro
. - Add helper methods for British pounds:
Money.pound_sterling
andMoney.gbp
. - Add
Money.from_amount
to create money from a value in units instead of fractional units. - Changed CHF symbol from 'Fr' to 'CHF'
- Changed CLF exponent from 0 to 4
- Changed CLP subunit_to_unit from 1 to 100
- Minor fixes to prevent warnings on unused variables and the redefinition of
Money.default_currency
Money#==
changed to acknowledge that 0 in one currency is equal to 0 in any currency.- Changed KRW subunit_to_unit from 100 to 1
- Decouple exchange rates storage from bank objects and formalize storage public API. Default is
Money::RatesStore::Memory
. Currency.new
now a singleton by its id