diff --git a/mj.rb b/mj.rb index 441db5c..7f44aec 100644 --- a/mj.rb +++ b/mj.rb @@ -22,7 +22,7 @@ class MajorityJudgment def mj s = 0 - (1..6).to_a.reverse.each do |r| + (1..7).to_a.reverse.each do |r| s = s + @count[r] if @count[r] return r if s >= @majority end @@ -31,7 +31,7 @@ class MajorityJudgment def proponents(rating = self.mj) p = 0 - (rating+1..6).to_a.reverse.each do |r| + (rating+1..7).to_a.reverse.each do |r| p = p + @count[r] if @count[r] end return p diff --git a/views/votes_show.erb b/views/votes_show.erb index 206740b..fdb8ba1 100644 --- a/views/votes_show.erb +++ b/views/votes_show.erb @@ -48,6 +48,14 @@ <% end %> +