1 <% candidates = @election.candidates.sort.collect {|candidate| candidate.id}-%>
2 <% names = Hash.new -%>
3 <% candidates.each do |candidate| -%>
4 <%names[candidate] = Candidate.find(candidate).name -%>
6 <table class="voterbox">
9 <% candidates.each do |candidate| -%>
10 <th><%= names[candidate] -%></th>
12 <% candidates.each do |winner| -%>
14 <th><%= names[winner] %></th>
15 <% candidates.each do |loser| -%>
16 <% if winner == loser -%>
19 <td><%= @election.condorcet_result.matrix[winner][loser] %></td>