Skip to content

Adds support for monetizing values at higher precision#1

Open
marcusmateus wants to merge 1 commit intomasterfrom
marcus/add_per_instance_infinite_precision
Open

Adds support for monetizing values at higher precision#1
marcusmateus wants to merge 1 commit intomasterfrom
marcus/add_per_instance_infinite_precision

Conversation

@marcusmateus
Copy link
Copy Markdown
Collaborator

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.

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.
Copy link
Copy Markdown

@joshuaflanagan joshuaflanagan left a comment

Choose a reason for hiding this comment

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

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.

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.

2 participants