Skip to content

Allow nil to be used as a default_currency#1095

Merged
yukideluxe merged 1 commit intoRubyMoney:mainfrom
quiltt:main
Jul 11, 2025
Merged

Allow nil to be used as a default_currency#1095
yukideluxe merged 1 commit intoRubyMoney:mainfrom
quiltt:main

Conversation

@sirwolfgang
Copy link
Contributor

This is a part of fixing the RubyMoney/money-rails#697

Copy link
Member

@sunny sunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an entry to the CHANGELOG as well? 🙏🏻

@sirwolfgang
Copy link
Contributor Author

@sunny Yeah my bad, updated.

@sirwolfgang sirwolfgang requested a review from sunny May 16, 2024 08:09
Copy link
Member

@sunny sunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@mediafinger
Copy link

We would love to see this included as well. A default currency is a hard no for our use case.

Is there any chance to get this merged anytime soon?

@mhenrixon
Copy link

Any chance this can get merged?

@yukideluxe
Copy link
Member

@sirwolfgang I am happy to unblock this and the corresponding money-rails PR if you resolve the conflicts 💪🏻

Co-authored-by: Sunny Ripert <sunny@sunfox.org>
@sirwolfgang
Copy link
Contributor Author

@yukideluxe Yay, rebased!

Copy link
Member

@yukideluxe yukideluxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Our intention is to release the long-anticipated version 7 very soon, but I think it makes a lot of sense to also remove all the deprecated methods and warnings that were added in preparation for the "next major release." Unless someone beats me to it – 😉😉😉 – we’ll need a few more days 🙏🏻

# Money.new(100, "EUR") #=> #<Money @fractional=100 @currency="EUR">
#
def initialize( obj, currency = Money.default_currency, options = {})
def initialize(obj, currency = Money.default_currency, options = {})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@yukideluxe yukideluxe merged commit 1d583ef into RubyMoney:main Jul 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants