X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/924aa1ff433ac4ccd2db5851e91038088be00a09..baf9ff0ec39c13f52ee8d4f087641dc5fcc9c53b:/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 -%>