X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/34fe63727a8929d7e9c529feee1f0c1e827acdfa..c8499fcec8f54c148e3b387e6d774a80a20121e3:/app/models/quick_vote.rb diff --git a/app/models/quick_vote.rb b/app/models/quick_vote.rb old mode 100644 new mode 100755 index 1df25af..98379cb --- a/app/models/quick_vote.rb +++ b/app/models/quick_vote.rb @@ -16,18 +16,14 @@ class QuickVote < Election def initialize(params={}) super - self.enddate = Time.now + 30 + self.enddate = Time.now + 30.days self.active = 1 self.anonymous = 1 self.quickvote = 1 end - def candidatelist=(candstring='') - @raw_candidates = candstring.split(';').collect {|cand| cand.strip } - end - - def candidatelist - @raw_candidates.join("; ") + def candidatelist=(candlist) + @raw_candidates = candlist end def name @@ -41,7 +37,6 @@ class QuickVote < Election def create_candidates @raw_candidates.each do |name| candidate = Candidate.new({:name => name}) - candidate.save self.candidates << candidate end end