Updated the "votes_per_day" method in graph controller to work better and
[selectricity] / app / models / quick_vote.rb
index 3538a3cc5d9047f2a4a7fccc8cc925bca6c2e2f2..eb4e63c421f32a4381a5ae1645730c2f9f912772 100644 (file)
@@ -16,10 +16,10 @@ class QuickVote < Election
   
   def initialize(params={})
     super
-    self.enddate =  Time.now + 30
+    self.startdate = Time.now
+    self.enddate =  Time.now + 30.days
     self.active = 1
     self.anonymous = 1
-    self.quickvote = 1
   end
 
   def candidatelist=(candlist)
@@ -37,7 +37,6 @@ class QuickVote < Election
   def create_candidates
     @raw_candidates.each do |name|
       candidate = Candidate.new({:name => name})
-      candidate.save
       self.candidates << candidate
     end
   end

Benjamin Mako Hill || Want to submit a patch?