elections marked as viewable will now dispaly a link to their results page while...
[selectricity-live] / app / controllers / election_controller.rb
index bfef0215377bc7547616dd343c81ecf8226aee83..571b93628e7e916f2dd4e2228e91c02729c5344d 100644 (file)
@@ -173,7 +173,7 @@ class ElectionController < ApplicationController
   def results
     @election = Election.find( params[:id] )
     votes = []
-
+    
     @election.voters.each do |voter|
       if voter.vote and voter.vote.confirmed?
         votes << voter.vote.rankings.sort.collect {|vote| vote.candidate_id}
@@ -186,6 +186,7 @@ class ElectionController < ApplicationController
     
     @candidates_by_id = {}
     @election.candidates.each {|cand| @candidates_by_id[cand.id] = cand}
+    
   end
   
   def detailed_results
@@ -194,7 +195,8 @@ class ElectionController < ApplicationController
 
     @voter_list = []
     @vote_list = []
-    @election.voters. each do |voter|
+    
+    @election.voters.each do |voter|
       if voter.vote and voter.vote.confirmed?
         @voter_list << voter.email
              @vote_list << voter.vote

Benjamin Mako Hill || Want to submit a patch?