mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
add percent format
This commit is contained in:
1 parent
e52830c9b4
commit
99ca0136ed
6 files changed
+47
-21
No files matched your search
@@ -25,6 +25,10 @@ module NumberUtils
|
||||
ApplicationController.helpers.number_to_currency(number, locale:, precision: 2, unit: CURRENCY_SYMBOLS[format])
|
||||
elsif locale
|
||||
ApplicationController.helpers.number_with_delimiter(number, locale:)
|
||||
elsif format == 'percent'
|
||||
"#{number}%"
|
||||
elsif format == 'percent_space'
|
||||
"#{number.to_s.tr('.', ',')} %"
|
||||
else
|
||||
number
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user