X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/b717fb1eab4f06d25f195a74c71806484ce0fd57..3d349b24ddccc0ce66b72de9d9fd4b4326d8fe75:/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] %> --