1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use zero-padding for number_to_rounded_converter

This commit is contained in:
Zachary Scott 2014-08-22 18:27:30 -07:00
parent 2602a49a86
commit 9bf2e5ec30

View file

@ -33,7 +33,7 @@ module ActiveSupport
a, b = s.split('.', 2)
a + '.' + b[0, precision]
else
"%01.#{precision}f" % rounded_number
"%00.#{precision}f" % rounded_number
end
delimited_number = NumberToDelimitedConverter.convert(formatted_string, options)