]> projects.mako.cc - selectricity-live/blobdiff - app/controllers/election_controller.rb
merged more fixes from devel
[selectricity-live] / app / controllers / election_controller.rb
index 3e169646bac4d583087fc585c36304fc186f9999..ccbbafe282bb2add4fc809c246f69a60b6bb04fb 100644 (file)
@@ -45,6 +45,7 @@ class ElectionController < ApplicationController
     @election.user = session[:user]
     @election.anonymous = 1
     @election.startdate = Time.now
+    @election.type = 'Election'
     
     holder = create_theme_hash
     unless holder.values.all? {|v| v.has_value?("")}
@@ -159,7 +160,7 @@ class ElectionController < ApplicationController
                                         :locals => { :page => 'review' }
 
     @election = Election.find(params[:id])
-    if @election.type == QuickVote
+    if @election.class  == QuickVote
       redirect_to(:controller => 'quickvote', :action => 'index', :ident => @election.id)
     end
       

Benjamin Mako Hill || Want to submit a patch?