X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/a8006b0bf9687f8882c3073eca2e8b4ebc7cde4a..823d530ba46c1fb3518c4deef0081738503837eb:/app/models/quick_vote.rb diff --git a/app/models/quick_vote.rb b/app/models/quick_vote.rb index c04b0d7..494f7ac 100644 --- a/app/models/quick_vote.rb +++ b/app/models/quick_vote.rb @@ -47,6 +47,11 @@ class QuickVote < Election if name =~ /^(create|index|confirm|change|results)$/ errors.add(:name, " is a reserved word.") end + + if enddate < startdate + errors.add(nil, "QuickVotes can't end before they start!") + end + end def candidatelist=(candlist)