From 2e08a1261b5e17ce3cc16c19935f0b0f48159c38 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 11 Sep 2014 17:47:42 -0500 Subject: [PATCH] don't overflow the progress bar --- app/models/campaign.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/campaign.rb b/app/models/campaign.rb index e8a0c78e..2c5ba43f 100644 --- a/app/models/campaign.rb +++ b/app/models/campaign.rb @@ -4,7 +4,7 @@ class Campaign < ActiveRecord::Base has_many :donations def progress_percent - (progress.to_f / goal) * 100 + [(progress.to_f / goal) * 100, 100].min end def self.current