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
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.
Regards,
Chris78
Comments and changes to this ticket
-
Craig Buchek April 13th, 2010 @ 01:22 AM
- 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.
-
Repository April 13th, 2010 @ 05:57 AM
- State changed from new to resolved
(from [36f3634a6afbaf36015abb531d6bea6360654b81]) Add a test that used to fail but is fixed now [#3417 state:resolved] http://github.com/rails/rails/commit/36f3634a6afbaf36015abb531d6bea...
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 3417 number_to_human_size truncates zeros from numbers like 10, 20, 100, 5000 etc. if :precision=>0 is given (from [36f3634a6afbaf36015abb531d6bea6360654b81]) Add a t...