fix type in description text
[selectricity-live] / app / models / vote.rb
index 21b5408ff8c83e130ff8154f3380c7a1a1cc4c96..98b5704e0aefce54a4ffc86861d2391e13357425 100644 (file)
@@ -87,7 +87,7 @@ class Vote < ActiveRecord::Base
   # too. It creates a vote with the candidates listed in order of preference 
   # based on alphabetical order. Meant to be manipulated and then confirmed
   def set_defaults!  
   # too. It creates a vote with the candidates listed in order of preference 
   # based on alphabetical order. Meant to be manipulated and then confirmed
   def set_defaults!  
-    self.votes = voter.election.candidates.sort.collect {|c| c.id }
+    self.votes = self.voter.election.candidates.sort_by { rand }.collect {|c| c.id }
     self.save
   end
          
     self.save
   end
          

Benjamin Mako Hill || Want to submit a patch?