X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/91c9d10ebdbdd37b03fd287a9923759f85561d20..92261fac718494dca6f92bbf193e75821fa336ec:/app/controllers/voter_controller.rb diff --git a/app/controllers/voter_controller.rb b/app/controllers/voter_controller.rb index 9e88e9e..45b9a1a 100644 --- a/app/controllers/voter_controller.rb +++ b/app/controllers/voter_controller.rb @@ -17,6 +17,7 @@ # . 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'