Let default currency config accept currency without minor unit #92

Merged
merged 1 commit into from Mar 25, 2013

Projects

None yet

2 participants

@ashchan
Member
ashchan commented Mar 23, 2013

Currency as Japanese Yen doesn't have a minor unit, see RubyMoney/money#101

When setting such currency as default, the current implementation will raise NoMethodError since it tries to use the minor unit value.

This fixes that by checking if the unit value is present.

@alup
Member
alup commented Mar 25, 2013

Thank you for this!

@alup alup merged commit 45d60b3 into RubyMoney:master Mar 25, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment