More flexible configuration for human_float_number
This commit is contained in:
parent
adbb74cb40
commit
b6fad2e92d
@ -388,10 +388,10 @@ module Additionals
|
||||
l(:show_welcome_right) => 'right' }, active)
|
||||
end
|
||||
|
||||
def human_float_number(value, sep = '.')
|
||||
def human_float_number(value, options = {})
|
||||
ActionController::Base.helpers.number_with_precision(value,
|
||||
precision: 2,
|
||||
separator: sep,
|
||||
precision: options[:precision].presence || 2,
|
||||
separator: options[:separator].presence || '.',
|
||||
strip_insignificant_zeros: true)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user