Skip to content

Feature: allow to configure (or document) Monetize.expect_whole_subunits #701

Open
@tagliala

Description

@tagliala

Slightly refers to #696

Hello, I was experiencing an issue in a form with the possibility to switch between currencies without decimals (JPY).

As expected as per https://github.com/RubyMoney/monetize?tab=readme-ov-file#usage, inserting 123,456 for JPY, even if , is the thousands separator for JPY resulted in 123, because Monetize allows fractional units by default (which may not be the case)

So I've added

Monetize.expect_whole_subunits = true

on the top of the money rails initializer

I'm asking what do you think to have a configuration option documented in Money Rails for this use case, so you can see immediately what is going wrong

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions