Fixed the detailed results so that they return anonymized results in
[selectricity] / app / controllers / elections_controller.rb
index 339c77bc8991fe80ef38ab6afddd53e5ca53974d..4a85c293b5ea4b424cf78c852e39ca45496feaec 100644 (file)
@@ -105,12 +105,20 @@ class ElectionsController < ApplicationController
   
   def detailed_results
     @election = Election.find( params[:id] )
-    @voting_rolls = []
+
+    @voter_list = []
+    @vote_list = []
     @election.voters.each do |voter|
       if voter.vote and voter.vote.confirmed?
-        @voting_rolls << voter
+        @voter_list << voter.email
+       @vote_list << voter.vote
       end
     end
+
+    @vote_list.sort!
+    @vote_list.sort! { |a,b| a.token <=> b.token }
+    #breakpoint
+
   end
   
   private

Benjamin Mako Hill || Want to submit a patch?