--- lib/core_extensions.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/core_extensions.rb b/lib/core_extensions.rb
index fcfed1d..c956c7e 100644
--- a/lib/core_extensions.rb
+++ b/lib/core_extensions.rb
@@ -73,9 +73,10 @@ def process(request, *args) class String def to_gb begin
- value,f,unit=self.match(/(\d+(\.\d+)?) ?(([KMG]B?|B))$/i)[1..3]
+ value,f,unit=self.match(/(\d+(\.\d+)?) ?(([KMGT]B?|B))$/i)[1..3] case unit.to_sym when nil, :B, :byte then (value.to_f / 1000_000_000)
+ when :TB, :T, :terabyte then (value.to_f * 1000) when :GB, :G, :gigabyte then value.to_f when :MB, :M, :megabyte then (value.to_f / 1000) when :KB, :K, :kilobyte, :kB then (value.to_f / 1000_000)
@@ -91,4 +92,4 @@ class ActiveModel::Errors def are_all_conflicts? self[:conflict].count == self.count end
-end
\ No newline at end of file
+end
-- 1.7.10
[https://github.com/theforeman/foreman/pull/69](https://github.com/theforeman/foreman/pull/69)