1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 07:39:39 +02:00

Allow 2 decimals when adding a balance (#614)

This commit is contained in:
Pieter Beulque 2024-04-15 17:27:39 +02:00 committed by GitHub
parent 5aca2ff9b6
commit fc631e698d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,7 +36,8 @@ class ApplicationFormBuilder < ActionView::Helpers::FormBuilder
default_options = {
class: "form-field__input",
value: money&.amount,
placeholder: Money.new(0, money&.currency || Money.default_currency).format
placeholder: Money.new(0, money&.currency || Money.default_currency).format,
step: "0.01" # Not all currencies have 2 decimal places
}
merged_options = default_options.merge(options)