diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2015-08-10 23:15:09 -0400 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2015-08-10 23:15:09 -0400 |
commit | 708110645722e1cd4cde0613ee6214cdd1b46db9 (patch) | |
tree | 13c649b8f7fb464edf24cf4542817804f5c47799 /activesupport/lib/active_support/number_helper | |
parent | 8adf25a6323ad20302d7009d482ec01491ec92eb (diff) | |
download | rails-708110645722e1cd4cde0613ee6214cdd1b46db9.tar.gz rails-708110645722e1cd4cde0613ee6214cdd1b46db9.tar.bz2 rails-708110645722e1cd4cde0613ee6214cdd1b46db9.zip |
Deprecate the :prefix option of `number_to_human_size`
Diffstat (limited to 'activesupport/lib/active_support/number_helper')
-rw-r--r-- | activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb b/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb index ac0d20b454..a4a8690bcd 100644 --- a/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb @@ -7,6 +7,10 @@ module ActiveSupport self.validate_float = true def convert + if opts.key?(:prefix) + ActiveSupport::Deprecation.warn('The :prefix option of `number_to_human_size` is deprecated and will be removed in Rails 5.1 with no replacement.') + end + @number = Float(number) # for backwards compatibility with those that didn't add strip_insignificant_zeros to their locale files |