]> projects.mako.cc - selectricity/commitdiff
two minor changes that fix bugs with the quickvote
author<mako@atdot.cc> <>
Fri, 25 Apr 2008 00:08:55 +0000 (20:08 -0400)
committer<mako@atdot.cc> <>
Fri, 25 Apr 2008 00:08:55 +0000 (20:08 -0400)
TODO
app/models/election.rb
config/routes.rb

diff --git a/TODO b/TODO
index 0575d629afa9bde8c0e0993dd6f09a92dff5a28c..0a4f465d05340399db6c38908d91a37bd4426d83 100644 (file)
--- a/TODO
+++ b/TODO
@@ -29,4 +29,6 @@ QuickVotes
 
 - support for emailing users when quickvotes conclude (see create.rhtml)
 
 
 - support for emailing users when quickvotes conclude (see create.rhtml)
 
-- support for invisible until over quickvotes (see create.rhtml)
+- support for invisible results until over quickvotes (see create.rhtml)
+
+- quickvotes should have automatically created urls
index 08ef1a57c025d7fe5192d0dc396b828ada9a12f0..9ce89b9b6baae86009ebc4b7ebdaef096e4dd970 100644 (file)
@@ -86,7 +86,7 @@ class Election < ActiveRecord::Base
   end
   
   def quickvote?
   end
   
   def quickvote?
-    self.class == 'QuickVote'
+    self.class == QuickVote
   end
 
   def active?
   end
 
   def active?
index 8c52ca077ad23e90fea7493117831242c2b55d9f..efd6a28e9fba914f696a9f78303ea6f3fc97ebc1 100644 (file)
@@ -27,7 +27,7 @@ ActionController::Routing::Routes.draw do |map|
                    :controller => 'voter',
                    :action => 'index'
 
                    :controller => 'voter',
                    :action => 'index'
 
-  map.connect 'quickvote/:action/(open.)?:id',
+  map.connect 'quickvote/:action/:id',
                :controller => 'quickvote',
                :requirements => { :action => /(create|add_candidate|sort_candidates|my_quickvotes)/ }
 
                :controller => 'quickvote',
                :requirements => { :action => /(create|add_candidate|sort_candidates|my_quickvotes)/ }
 

Benjamin Mako Hill || Want to submit a patch?