forked from RubyMoney/money
-
Notifications
You must be signed in to change notification settings - Fork 0
remove spec for pence #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With the help of [awesome_bot](https://github.com/dkhamsing/awesome_bot) - Use https where possible - Update Code Climate badge code - Update broken links - Replace `master` with `main`
Zimbabwe Gold is the official currency of Zimbabwe as of April 8 2024. This PR adds support for the new currency https://en.wikipedia.org/wiki/Zimbabwean_ZiG
The example for the documentation of the `:html_wrap_symbol` option showed the Ruby code from the previous option, `:disambiguate`, with the correct resulting string. Fixed to show the correct option being used in the example.
so that it can emphasize it's behaviour better
So that it won't return to the global value in case if someone will modify down in the stack. For example we might have: ```ruby - initializers/money.rb Money.rounding_mode = BigDecimal::ROUND_HALF_EVEN - controllers/test.rb Money.with_rounding_mode(BigDecimal::ROUND_UP) do object.amount = Money.from_amount(1.234) object.save other_object.amount = object.amount * different_rate end - models/object.rb def save Money.with_rounding_mode(BigDecimal::ROUND_DOWN) do self.tax = object.amount * tax_rate end ... end ``` Above example prior the change would cause other_object to use `ROUND_HALF_EVEN`, despite it's explicitly defined in a `with_rounding_mode` block which sets `ROUND_UP`. The small rounding errors might be tricky to debug, and in worst case scenarios can cumulate to a bigger differences when code operates on multiple amounts that might be incorrectly rounded. Co-Authored-By: Łukasz Wójcik <[email protected]>
…to the smallest denomination This new method allows you to get a new Money instance rounded to the smallest denomination. Closes RubyMoney#1131
Remove special handling for Japanese language only
…recision-deprecation remove deprecated Money.infinite_precision method
Co-authored-by: Sunny Ripert <[email protected]>
…ult-currency stop setting USD as default currency
Co-authored-by: Sunny Ripert <[email protected]>
remove deprecations related with rounding mode
Fix O(n2) to be O(n) for generate method
Add Money.with_bank for Dynamic Currency Stores
Add `Money#to_nearest_cash_value` to return a rounded Money instance to the smallest denomination
…g-deprecation remove Money#currency_as_string and Money#currency_as_string= deprecated methods
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Money#to_nearest_cash_valueto return a rounded Money instance to the smallest denomination