From 597d4add3416d06c2befb6368a06f6cea4215a39 Mon Sep 17 00:00:00 2001 From: Date: Thu, 24 Apr 2008 20:08:55 -0400 Subject: [PATCH] two minor changes that fix bugs with the quickvote --- TODO | 4 +++- app/models/election.rb | 2 +- config/routes.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) 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)/ } -- 2.30.2