X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/b47d1fbe36d5aeb9b79d6bbaab035ca448a3c3ef..adfcf4dd7d989d0560e2a8f6a590dd10c5a49a08:/app/models/election.rb diff --git a/app/models/election.rb b/app/models/election.rb index 7d8ad80..08ef1a5 100644 --- a/app/models/election.rb +++ b/app/models/election.rb @@ -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