X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/d6d44b7c8dc1d8ea3e425116caadca43c9412fed..4e41e4ab171d4d47cdac0f8676bf78d36e6eb007:/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 66e0cbf..628ce55 100644
--- a/app/views/quickvote/_pref_tables.rhtml
+++ b/app/views/quickvote/_pref_tables.rhtml
@@ -2,22 +2,20 @@
<% voters = @election.voters.size %>
<% matrix = @election.condorcet_result.matrix %>
<% victories = @election.condorcet_result.victories_and_ties %>
-<% names = @election.names_by_id %>
-
-
+
- |
+ |
<% 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 -%>
-- |
@@ -34,21 +32,20 @@
-
+
<% candidates.each do |victor| %>
- <%=h names[victor] %> |
+ <%=h @names[victor] %> |
<% victories[victor].keys.each do |loser| %>
<% margin = victories[victor][loser]%>
- <%=h names[loser] %>
+ | <%=h @names[loser] %>
<% if margin == 0%>
Tied!
<% else -%>
(<%= margin%>)
<% end -%>
- |
+
<% end -%>
<% end -%>
-