This project is archived and is in readonly mode.

#3417 ✓resolved

number_to_human_size truncates zeros from numbers like 10, 20, 100, 5000 etc. if :precision=>0 is given

Reported by Chris78 | October 23rd, 2009 @ 01:17 PM

Add the following to /rails/actionpack/test/template/number_helper_test.rb

assert_equal '10 MB', number_to_human_size(9961472,:precision=>0)

to see the problem.

A patch for the test and fix is provided as attachment.


Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by