From: Date: Fri, 25 Apr 2008 00:08:55 +0000 (-0400) Subject: two minor changes that fix bugs with the quickvote X-Git-Url: https://projects.mako.cc/source/selectricity-live/commitdiff_plain/597d4add3416d06c2befb6368a06f6cea4215a39 two minor changes that fix bugs with the quickvote --- diff --git a/TODO b/TODO index 0575d62..0a4f465 100644 --- a/TODO +++ b/TODO @@ -29,4 +29,6 @@ QuickVotes - 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 diff --git a/app/models/election.rb b/app/models/election.rb index 08ef1a5..9ce89b9 100644 --- a/app/models/election.rb +++ b/app/models/election.rb @@ -86,7 +86,7 @@ class Election < ActiveRecord::Base end def quickvote? - self.class == 'QuickVote' + self.class == QuickVote end def active? diff --git a/config/routes.rb b/config/routes.rb index 8c52ca0..efd6a28 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -27,7 +27,7 @@ ActionController::Routing::Routes.draw do |map| :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)/ }