]> projects.mako.cc - selectricity/blobdiff - app/controllers/voter_controller.rb
mergec minor changes from live
[selectricity] / app / controllers / voter_controller.rb
index 9e88e9e282b048cfe1b0e9177081fc1300424873..45b9a1a85f950cec5d54320942917be65071352c 100644 (file)
@@ -17,6 +17,7 @@
 # <http://www.gnu.org/licenses/>.
 
 class VoterController < ApplicationController
+  helper :sparklines
   layout 'main'
   require_dependency "voter"
   require_dependency "vote"
@@ -106,8 +107,8 @@ class VoterController < ApplicationController
   def details
     if authenticate
       @election = @voter.election
-      @votes = @election.votes.select {|v| v.confirmed? }.randomize
-      @voters = @votes.collect {|v| v.voter}.randomize
+      @votes = @election.votes.select {|v| v.confirmed? }.shuffle
+      @voters = @votes.collect {|v| v.voter}.shuffle
       render :action => 'details'
     else
       redirect_to :action => 'index'

Benjamin Mako Hill || Want to submit a patch?