RubyMoney / monetize

A library for converting various objects into `Money` objects.
MIT License
430 stars 107 forks source link

Use provided currency over assumed currency #136

Closed bkeepers closed 4 years ago

bkeepers commented 4 years ago

It is common to write $1.09 CAD. In this case, the provided currency should be used over the computed currency based on the symbol when using the assume_from_symbol option.

This pull request prioritizes the currency in the input. If no currency is provided, it still falls back to assuming the currency from the symbol.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling bc19aec531dc947e1eefbf73386d3e8f384257c6 on bkeepers:respect-explicit-currency into c25d5089b1c086e6a9c0a35073aaecbd9acc86f9 on RubyMoney:master.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling bc19aec531dc947e1eefbf73386d3e8f384257c6 on bkeepers:respect-explicit-currency into c25d5089b1c086e6a9c0a35073aaecbd9acc86f9 on RubyMoney:master.