]> projects.mako.cc - selectricity-live/blobdiff - app/views/quickvote/results.rhtml
Revise functional test of graph controller for retrieving an unknown id number. Curre...
[selectricity-live] / app / views / quickvote / results.rhtml
index 799459df0f9704d5079271d4a37e34fa979a3152..6c1130f5e56b560ecd03989baf9b6b69406bce72 100644 (file)
@@ -158,7 +158,7 @@ by several other names.</p>
     <td><% begin %>
         <% raise ArgumentError.new, "Local Server" if voter.ipaddress == "127.0.0.1" %>
         <% raise ArgumentError.new, "XML-RPC Voter" if voter.ipaddress == "XMLRPC Request" %>
-        <% w= Whois::Whois.new(IPAddr.new(voter.ipaddress).to_s,true)%>
+        <% w= Whois::Whois.new(IPAddr.new(voter.ipaddress),true)%>
         <%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host)%>
       </td>
       <td>
@@ -169,6 +169,10 @@ by several other names.</p>
       <%=h err %>
     </td>
     <td><%=h err%>
+    <% rescue NoMethodError %>
+      DNS Unreachable
+    </td>
+    <td> DNS Unreachable
     <% end %>
     </td>
   <td><%= voter.vote.votestring %></td>
@@ -179,7 +183,7 @@ by several other names.</p>
 <%= render :partial => 'victories_ties' %>
 <%= render :partial => 'pref_table' %>
 
-<%= image_tag( graph_url( :action => 'votes_per_day', :id => @election ) ) %><br />
-<%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%><br />
+<%=image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%>
+<br />
 <%= image_tag( graph_url( :action => 'borda_bar', :id => @election ) ) %><br />
 <%= image_tag( graph_url( :action => 'choices_positions', :id => @election ) ) %>

Benjamin Mako Hill || Want to submit a patch?