X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/0bcced90721389c27eb815ca8dcab85533417697..49bc919b9f7edd189a311cdb910ab0a7500030ac:/app/views/quickvote/_pref_table.rhtml 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| -%> - + <% end -%> <% candidates.each do |winner| -%> - + <% candidates.each do |loser| -%> <% if winner == loser -%> @@ -16,4 +20,5 @@ <% end -%> <% end -%> -<%end -%> \ No newline at end of file +<% end -%> +
<%= candidate -%><%= names[candidate] -%>
<%= winner %><%= names[winner] %> --