Integrate MajorityJudgment class

This commit is contained in:
ricola 2025-04-06 17:04:31 -06:00
parent 4693e7bf73
commit c8bfea4898
3 changed files with 16 additions and 4 deletions

View file

@ -48,6 +48,14 @@
<% end %>
</table>
<h2>Results</h2>
<ol>
<% @vote.candidates.sort { |a, b| a.mj <=> b.mj }.reverse.each do |candidate| %>
<li><%= candidate.name %>: <%= candidate.mj.mj %></li>
<% end %>
</ol>
<h2>New candidate</h2>
<form action="/votes/<%= @vote.secure_id %>/candidates" method="post">