From ba56f87f74def6dfb57c1987e40bf8edf465d109 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 24 Mar 2017 21:44:08 +0000 Subject: [PATCH] Properly parse negative filesizes --- app/views/subscriptions/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/subscriptions/new.html.erb b/app/views/subscriptions/new.html.erb index 36811e27..3b31cc81 100644 --- a/app/views/subscriptions/new.html.erb +++ b/app/views/subscriptions/new.html.erb @@ -167,7 +167,7 @@

- You have <%= Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty %> of bandwidth remaining. + You have <%= (current_user.upload_bandwidth_kb) > 0 ? Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty : '-' + Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty %> of bandwidth remaining.

This bandwidth can be used to upload images to your content anywhere on the site. Deleting an uploaded image frees