]> projects.mako.cc - selectricity-live/commitdiff
Merge from Justin
authorJohn Dong <jdong@mit.edu>
Wed, 15 Aug 2007 21:56:18 +0000 (17:56 -0400)
committerJohn Dong <jdong@mit.edu>
Wed, 15 Aug 2007 21:56:18 +0000 (17:56 -0400)
Fix runtime errors in RubyVote introduced.

app/views/quickvote/results.rhtml
lib/rubyvote/election.rb
lib/rubyvote/positional.rb

index 5626636c7000b0a29aa9de1c07bb2c24d6529a8e..3b3a54d9ef68e11128b22891956d9bdb05cdf9fd 100644 (file)
@@ -159,7 +159,7 @@ by several other names.</p>
       <%= `host #{IPAddr.new(voter.ipaddress).to_s}`.sub(/^.*pointer (.*)\.$/, '\1') %>
     
     <% rescue ArgumentError => err %>
-      <%= " - " %>
+      <%= voter.ipaddress %>
     <% end %>
     </td>
   <td><%= voter.vote.votestring %></td>
index efb8dd8aae1ce56abc9896853a32eaf5c0f562da..ffd31c846e56400e9df945361d5a4c11ebb9df9d 100644 (file)
@@ -152,7 +152,7 @@ class PluralityResult < ElectionResult
       b[1] <=> a[1]
     end.collect {|a| a[0]}
     
-    @points = self.election.votes
+    @points = @election.votes
     
     # winners are anyone who has the same number of votes as the
     # first person
index dc0b63aca3811bdb07e2fdcfb4f4107d5d53b0d3..056194b519dc88f2a79adc3617bf95f250fa3310 100644 (file)
@@ -78,7 +78,7 @@ class BordaResult < ElectionResult
       votes[i] == votes[@ranked_candidates[0]]
     end
     
-    @points = self.election.votes
+    @points = @election.votes
   end
 
 end

Benjamin Mako Hill || Want to submit a patch?