% candidates = @election.candidates.sort.collect {|candidate| candidate.id}-%> <% names = Hash.new -%> <% candidates.each do |candidate| -%> <%names[candidate] = Candidate.find(candidate).name -%> <% end -%>
<% candidates.each do |candidate| -%> | <%= names[candidate] -%> | <% end -%> <% candidates.each do |winner| -%>|
---|---|---|
<%= names[winner] %> | <% candidates.each do |loser| -%> <% if winner == loser -%>-- | <% else %><%= @election.condorcet_result.matrix[winner][loser] %> | <% end -%> <% end -%>