This commit is contained in:
parent
2a8aad92d6
commit
0fe00bce50
|
@ -4,9 +4,9 @@ module StatisticsHelper
|
||||||
def data_format_string num
|
def data_format_string num
|
||||||
result = num
|
result = num
|
||||||
if num < 1024 * 1024
|
if num < 1024 * 1024
|
||||||
result = format("%0.3f", (num/1024)) + " GB"
|
result = format("%0.3f", (num/1024)).to_s + " GB"
|
||||||
else
|
else
|
||||||
result = format("%0.3f", (num/(1024*1024))) + " TB"
|
result = format("%0.3f", (num/(1024*1024))).to_s + " TB"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue