X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/924aa1ff433ac4ccd2db5851e91038088be00a09..3b4bd99898faa4b3ebdc78b2e5a2e7047c1a6450:/app/views/quickvote/_pref_table.rhtml?ds=sidebyside 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 -%>