]> projects.mako.cc - selectricity-live/blobdiff - app/models/candidate.rb
blanked readme file and created a list of contributors inside
[selectricity-live] / app / models / candidate.rb
old mode 100644 (file)
new mode 100755 (executable)
index 7af978a..430b6ab
@@ -1,6 +1,8 @@
 class Candidate < ActiveRecord::Base
   belongs_to :election
-  validates_uniqueness_of :name
+  validates_presence_of :name
+
+  # validate uniqueness of a name *within a given election*
 
   def <=>(other)
     self.name <=> other.name 

Benjamin Mako Hill || Want to submit a patch?