Skip to content

Commit

Permalink
Merge pull request #695 from afuno/patch-1
Browse files Browse the repository at this point in the history
Add information about `subunit_numericality` to README
  • Loading branch information
semmons99 authored Apr 15, 2024
2 parents 72c3773 + 4b9aae0 commit df7a030
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,17 @@ to the validation you are willing to skip, like this:
monetize :price_in_a_range_cents, numericality: false
```

And you can also use `subunit_numericality` for subunit:

```ruby
monetize :price_in_a_range_cents,
allow_nil: true,
subunit_numericality: {
greater_than_or_equal_to: 0,
less_than_or_equal_to: 100_00
}
```

### Mongoid 2.x and 3.x

`Money` is available as a field type to supply during a field definition:
Expand Down

0 comments on commit df7a030

Please sign in to comment.