debian-mirror-gitlab/app/helpers/storage_helper.rb

8 lines
218 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
module StorageHelper
def storage_counter(size_in_bytes)
precision = size_in_bytes < 1.megabyte ? 0 : 1
number_to_human_size(size_in_bytes, delimiter: ',', precision: precision, significant: false)
end
end