rails/rails — pull request #18112 by leods92 (2014-12-20 20:20:41+00:00)
Title: Helper #number_to_human_size should display proper unit.

There are ambiguous abbreviations which have been being used in Rails: KB, GB...
These are now considered the SI ones which divides units on a decimal basis.
However, the way we are used to divide file sizes is binary and there's a proper syntax to them.
More about that on: http://en.wikipedia.org/wiki/File_size.

Anyway, I found this very simple way of using number_to_human_size's :prefix option to automatically set the units.
I hope this is useful.