mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Fix precision in money input
This commit is contained in:
parent
3ef67faf7e
commit
31ecd3ccd4
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,8 @@
|
|||
value: if options[:value]
|
||||
sprintf("%.#{currency.default_precision}f", options[:value])
|
||||
elsif form.object && form.object.respond_to?(amount_method)
|
||||
form.object.public_send(amount_method)
|
||||
val = form.object.public_send(amount_method)
|
||||
sprintf("%.#{currency.default_precision}f", val) if val.present?
|
||||
end,
|
||||
min: options[:min] || -99999999999999,
|
||||
max: options[:max] || 99999999999999,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue