Allowed for the results page of quickvotes to be hidden while the quickvote is go
[selectricity] / app / controllers / quickvote_controller.rb
index c2ed0559659e4995f7ccbb53aecd74aef41b81eb..7ad1722cb59cf69f2021b22021647ef0a26f452f 100644 (file)
@@ -178,6 +178,9 @@ class QuickvoteController < ApplicationController
       redirect_to :controller => 'site'
       return
     end
+    if @election.viewable == 0 && @election.active == 1
+      render :action => 'not_viewable' and return
+    end
     @results = @election.results
     @candidates = {}
     @election.candidates.each {|c| @candidates[c.id] = c}

Benjamin Mako Hill || Want to submit a patch?