aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAkshay Vishnoi <akshay.vishnoi@vinsol.com>2015-12-22 23:05:50 +0530
committerAkshay Vishnoi <akshay.vishnoi@vinsol.com>2015-12-22 23:07:06 +0530
commit3d1f95d0e8ca70f5d892d9b2ed78e99ff7cb3bde (patch)
tree063fa8ff94f7cec601b58c8b4a52e6657c95c3f6 /actionview
parent47fd7c95555cb1c6e05768cd1b9ee38ad5cf9d1f (diff)
downloadrails-3d1f95d0e8ca70f5d892d9b2ed78e99ff7cb3bde.tar.gz
rails-3d1f95d0e8ca70f5d892d9b2ed78e99ff7cb3bde.tar.bz2
rails-3d1f95d0e8ca70f5d892d9b2ed78e99ff7cb3bde.zip
Add support for Petabyte and Exabyte in number to human size
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/number_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb
index d7182d1fac..0c5cecae01 100644
--- a/actionview/lib/action_view/helpers/number_helper.rb
+++ b/actionview/lib/action_view/helpers/number_helper.rb
@@ -261,6 +261,8 @@ module ActionView
# number_to_human_size(1234567) # => 1.18 MB
# number_to_human_size(1234567890) # => 1.15 GB
# number_to_human_size(1234567890123) # => 1.12 TB
+ # number_to_human_size(1234567890123456) # => 1.1 PB
+ # number_to_human_size(1234567890123456789) # => 1.07 EB
# number_to_human_size(1234567, precision: 2) # => 1.2 MB
# number_to_human_size(483989, precision: 2) # => 470 KB
# number_to_human_size(1234567, precision: 2, separator: ',') # => 1,2 MB