% victories, tied =@election.condorcet_result.list_defeats -%>
<%candidates = @election.candidates.sort.collect {|candidate| candidate.id}%>
<% names = Hash.new -%>
<% candidates.each do |candidate| -%>
<%names[candidate] = Candidate.find(candidate).name -%>
<% end -%>
<% victories.each do |victory| -%>
<%= names[victory[0]] %> beat <%= names[victory[1]] %> by <%= victory[2]%>
votes.
<% end -%>
<% tied.each do |tie| -%>
<%= names[tie[0]]%> tied with <%= names[tie[1]]%>
<% end -%>