Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#3417

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.

Regards,
Chris78

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

State: resolved
Milestone: none
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. Chris78
    Chris78

    Hmm, so nobody is feeling responsible for this issue yet?

    December 15th, 2009 @ 04:25 PM

  2. Craig Buchek
    Craig Buchek
    • Tag set to fixed
    • Assigned user set to Jeremy Kemper

    Patch does not apply clean to master as of 3c456a869abeb0a639518180214db5ead428aedf, but test passes without changes.

    Attaching file with added test.

    April 13th, 2010 @ 01:22 AM

  3. Repository