See Github #7819, #7829, #7830, #7835 and friends.
Summary: because this is number_to_human_size
not number_to_computer_scientist_size. Human here refers to your
users/customers. If they happen to be computer scientists you should roll your
own (and maybe make it a gem and open source it).
—
Sent from Mailbox for iPhone
On Sun, Mar 24, 2013 at 8:15 AM, Roman Novikov <mystdeim@gmail.com> wrote:
> Why rails doesn''t follow standart?
> Example:
> number_to_human_size(10000000, prefix: :si) -> ''10 MB''
>>
> This is ok.
> helper.number_to_human_size(10000, prefix: :si) -> ''10
KB''
>>
> This must be ''10 *k*B''
>
>> helper.number_to_human_size(10000000) -> ''9.54 MB''
>>
> WTF? ''9.54 *MiB*'' is right, binary prefix*!*
> Please look this http://en.wikipedia.org/wiki/Binary_prefix
> Page from metrologia (2000)
>
http://habrastorage.org/storage2/8da/ab2/cca/8daab2cca2ac7d60544ea7af68a5eb75.jpg
> Also, Use si (Decimal prefix) by default is good idea. (Why it names si?)
> Tell me am I right?
> I really want make rails better, how I can fix this issue?
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to rubyonrails-core+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-core+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.