Skip to content

Commit

Permalink
Explicitly set Money rounding to ROUND_HALF_EVEN
Browse files Browse the repository at this point in the history
This is the current default value, but it will change in
the Money gem in some future release (v7).

People can start adhering to that value by setting

Money.rounding_mode = BigDecimal::ROUND_HALF_UP

in their own application. For now, this is what we used so far
and we should not change it for existing applications.

Ref: RubyMoney/money#883
  • Loading branch information
kennyadsl authored and jiz4oh committed Apr 15, 2022
1 parent 410545c commit 3cd7ed5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/config/initializers/money.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
require 'money'

Money.locale_backend = :i18n
Money.rounding_mode = BigDecimal::ROUND_HALF_EVEN

0 comments on commit 3cd7ed5

Please sign in to comment.