X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/7f2bdc00ac867092eebed2b64596efeaacca0d87..597c27db39d8b36e623a9d6573e75edf657142c0:/app/views/quickvote/results.rhtml diff --git a/app/views/quickvote/results.rhtml b/app/views/quickvote/results.rhtml index 1fad7ea..98a71e5 100644 --- a/app/views/quickvote/results.rhtml +++ b/app/views/quickvote/results.rhtml @@ -1,4 +1,4 @@ -<% %> +<%require 'IPAddr' %>

Results

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

<% next unless voter.voted? %> <%= 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 %> <% end %>