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
# Meal.rbregister_currency:gbp# does nothing# with_currency does nothingmonetize:price_cents,with_currency: :gbp
In rails console
Meal.last.price.currency.name#= "United States Dollar"
A workaround was to use a callback in the model:
[...]after_initializedo |meal|
self.price_currency=Money::Currency.new(:gbp)# If we kept register_currency :gbp, we could do:# self.price_currency = Meal.currencyend
Nothing actually works as per documentation. Has this issue been addressed, but not reflect on the documentation?
Thanks
The text was updated successfully, but these errors were encountered:
In the latest rails 8.0, I could not seem to change the default currency from
usd
togbp
.Things I've tried:
Have also tried, in model:
In
rails console
A workaround was to use a callback in the model:
Nothing actually works as per documentation. Has this issue been addressed, but not reflect on the documentation?
Thanks
The text was updated successfully, but these errors were encountered: