Skip to content

Deprecate si prefix#21191

Merged
rafaelfranca merged 2 commits intorails:masterfrom
byroot:deprecate-si-prefix
Aug 11, 2015
Merged

Deprecate si prefix#21191
rafaelfranca merged 2 commits intorails:masterfrom
byroot:deprecate-si-prefix

Conversation

@byroot
Copy link
Member

@byroot byroot commented Aug 11, 2015

As discussed a while ago in #7835 (comment)

cc @rafaelfranca

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to keep the tests and use assert_deprecated block just to make sure we don't break the deprecated code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware of assert_deprecated. I'll update thanks.

@byroot byroot force-pushed the deprecate-si-prefix branch from 6bb020b to e96403b Compare August 11, 2015 03:35
rafaelfranca added a commit that referenced this pull request Aug 11, 2015
@rafaelfranca rafaelfranca merged commit b864641 into rails:master Aug 11, 2015
y-yagi added a commit to y-yagi/rails that referenced this pull request Jun 9, 2016
@hakanai
Copy link

hakanai commented Aug 2, 2016

Hang on, but isn't it still formatting questionably by default in v5.0.0?

irb(main):001:0> include ActionView::Helpers::NumberHelper
=> Object
irb(main):002:0> number_to_human_size(1000000)
=> "977 KB"

I'd expect either "1000 kB" or "1 MB" and wouldn't mind removal of the option if the default behaviour had been correct in the first place...

I can understand not wanting "kiB", "MiB" and the like since not everyone will have seen those before and very few apps would need to use them anyway, but can't we at least have "kB", "MB" and so on computed correctly? If the method is supposed to produce a "human" size, why is it using the base 2 definition of the units?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants