]> projects.mako.cc - selectricity/blobdiff - app/models/election.rb
Fixed minor spelling errors on results pages, tried to fix quickvotes bug but unsucce...
[selectricity] / app / models / election.rb
index 7d8ad80d883ee45ab6bee1a875ed446478d68151..08ef1a57c025d7fe5192d0dc396b828ada9a12f0 100644 (file)
@@ -73,7 +73,7 @@ class Election < ActiveRecord::Base
       reasons << "You must have at least two candidates."
     end
     
-    if self.voters.length <= 1
+    if self.voters.length <= 1 and self.authenticated?
       reasons << "You must have at least two voters."
     end
 
@@ -97,6 +97,10 @@ class Election < ActiveRecord::Base
     active == 2
   end
 
+  def authenticated?
+    authenticated
+  end
+  
   def shortdesc
     shortdesc = description.split(/\n/)[0]
   end

Benjamin Mako Hill || Want to submit a patch?