X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/1ef3925927fb35483da98af08f9fc175d5502708..f38aa87edf153cf8f5f5c93a78fbf1424a8e62f2:/app/views/quickvote/_pref_tables.rhtml?ds=sidebyside diff --git a/app/views/quickvote/_pref_tables.rhtml b/app/views/quickvote/_pref_tables.rhtml index 18e5aa3..628ce55 100644 --- a/app/views/quickvote/_pref_tables.rhtml +++ b/app/views/quickvote/_pref_tables.rhtml @@ -2,7 +2,6 @@ <% voters = @election.voters.size %> <% matrix = @election.condorcet_result.matrix %> <% victories = @election.condorcet_result.victories_and_ties %> -<% names = @election.names_by_id %> @@ -10,13 +9,13 @@ <% candidates.each do |candidate| -%> - <%=h names[candidate] -%> + <%=h @names[candidate] -%> <% end -%> <% candidates.each do |winner| -%> - <%=h names[winner] %> + <%=h @names[winner] %> <% candidates.each do |loser| -%> <% if winner == loser -%> -- @@ -36,10 +35,10 @@ <% candidates.each do |victor| %> - + <% victories[victor].keys.each do |loser| %> <% margin = victories[victor][loser]%> -
<%=h names[victor] %><%=h @names[victor] %><%=h names[loser] %> + <%=h @names[loser] %> <% if margin == 0%> Tied! <% else -%>