From 1727deb52e0f6fcdfeff9cd67843bf1b9a7aaeb8 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 May 2018 10:05:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/statistics_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/statistics_helper.rb b/app/helpers/statistics_helper.rb index be6cd6104..91fe2bf84 100644 --- a/app/helpers/statistics_helper.rb +++ b/app/helpers/statistics_helper.rb @@ -4,9 +4,9 @@ module StatisticsHelper def data_format_string num result = num if num < 1 - result = format("%0.1f", (num*1024)).to_s + " GB" + result = format("%0.1f", (num*1024)).to_s + " KB" elsif num < 1024 - result = format("%0.1f", num).to_s + " GB" + result = format("%0.1f", num).to_s + " MB" elsif num < 1024 * 1024 result = format("%0.1f", (num/1024)).to_s + " GB" else