forked from OpenNeo/impress
don't overflow the progress bar
This commit is contained in:
parent
8e22c271a4
commit
2e08a1261b
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue