Adds support for monetizing values at higher precision#1
Open
marcusmateus wants to merge 1 commit intomasterfrom
Open
Adds support for monetizing values at higher precision#1marcusmateus wants to merge 1 commit intomasterfrom
marcusmateus wants to merge 1 commit intomasterfrom
Conversation
Requires an updated Money gem with an API accepting an options hash with an `:infinite_precision` argument that will set the precision level on a given Money instance. An implementation of the changes to the Money gem required to add support for an API of the above form can be found here: ShippingEasy/money#2.
marcusmateus
added a commit
to ShippingEasy/money-rails
that referenced
this pull request
Aug 15, 2019
Uses work on `money` gem (ShippingEasy/money#2) and the `monetize` gem (ShippingEasy/monetize#1) to add infinite_precision support at the instance level. Leveraging that work these changes set the precision on the Money instance for a model attribute based on that attributes backing column type. If it is backed by a :decimal column an infinite precision Money instance is created. Otherwise a normal precision instance is created.
joshuaflanagan
approved these changes
Aug 15, 2019
joshuaflanagan
left a comment
There was a problem hiding this comment.
This looks fine, but we will want to increase the version requirement in the gemspec, once we know which version of money contains the new functionality.
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
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.
Requires an updated Money gem with an API accepting an options hash with
an
:infinite_precisionargument that will set the precision level on agiven Money instance.
An implementation of the changes to the Money gem required to add
support for an API of the above form can be found here:
ShippingEasy/money#2.