Welcome to mirror list, hosted at ThFree Co, Russian Federation.

storage_helper.rb « helpers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e19c67a37ca0c46c38b076b2a05d1d648cdca618 (plain)
1
2
3
4
5
6
7
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