This commit is contained in:
cxt 2018-05-08 16:33:25 +08:00
parent 2a8aad92d6
commit 0fe00bce50
1 changed files with 2 additions and 2 deletions

View File

@ -4,9 +4,9 @@ module StatisticsHelper
def data_format_string num
result = num
if num < 1024 * 1024
result = format("%0.3f", (num/1024)) + " GB"
result = format("%0.3f", (num/1024)).to_s + " GB"
else
result = format("%0.3f", (num/(1024*1024))) + " TB"
result = format("%0.3f", (num/(1024*1024))).to_s + " TB"
end
end
end