X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/46f924b34b305d2474b09ce204a7a9187e8d8622..924aa1ff433ac4ccd2db5851e91038088be00a09:/app/views/quickvote/results.rhtml diff --git a/app/views/quickvote/results.rhtml b/app/views/quickvote/results.rhtml index 1fad7ea..5626636 100644 --- a/app/views/quickvote/results.rhtml +++ b/app/views/quickvote/results.rhtml @@ -1,4 +1,4 @@ -<% %> +<%require 'IPAddr' %>

Results

<% if @election.shortdesc %> @@ -145,7 +145,6 @@ by several other names.

Voters

- @@ -156,14 +155,21 @@ by several other names.

<% next unless voter.voted? %> - + <% end %>
IP Address
<%= voter.ipaddress %><%= `host #{voter.ipaddress}`.sub(/^.*pointer (.*)\.$/, '\1') %><% begin %> + <%= `host #{IPAddr.new(voter.ipaddress).to_s}`.sub(/^.*pointer (.*)\.$/, '\1') %> + + <% rescue ArgumentError => err %> + <%= " - " %> + <% end %> + <%= voter.vote.votestring %>
+<%= render :partial => 'pref_table' %> + <%= image_tag( graph_url( :action => 'votes_per_day', :id => @election ) ) %>
<%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%>
<%= image_tag( graph_url( :action => 'borda_bar', :id => @election ) ) %>
<%= image_tag( graph_url( :action => 'choices_positions', :id => @election ) ) %> -