X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/924aa1ff433ac4ccd2db5851e91038088be00a09..7ea8b24f8b002feba79f92e5333f1ec5c6e9f929:/app/views/quickvote/_pref_table.rhtml?ds=inline diff --git a/app/views/quickvote/_pref_table.rhtml b/app/views/quickvote/_pref_table.rhtml index dfcb6cc..32f5de4 100644 --- a/app/views/quickvote/_pref_table.rhtml +++ b/app/views/quickvote/_pref_table.rhtml @@ -1,13 +1,17 @@ -<% candidates = @election.candidates.sort.collect {|candidate| candidate.id} -%> +<% 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| -%> - | <%= candidate -%> | +<%= names[candidate] -%> | <% end -%> <% candidates.each do |winner| -%>
---|---|---|
<%= winner %> | +<%= names[winner] %> | <% candidates.each do |loser| -%> <% if winner == loser -%>-- | @@ -16,4 +20,5 @@ <% end -%> <% end -%>