1
0
Fork 0
forked from OpenNeo/impress

don't overflow the progress bar

This commit is contained in:
Emi Matchu 2014-09-11 17:47:42 -05:00
parent 8e22c271a4
commit 2e08a1261b

View file

@ -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