]> projects.mako.cc - selectricity-live/blobdiff - app/models/candidate.rb
Merge from jdong
[selectricity-live] / app / models / candidate.rb
index 7b6e8024a52bb30bfa1dbb57f80167426cf51502..430b6ab22762223a728eaf6cc27bb3d51f7b8d2e 100644 (file)
@@ -1,8 +1,9 @@
 class Candidate < ActiveRecord::Base
   belongs_to :election
 class Candidate < ActiveRecord::Base
   belongs_to :election
-  validates_uniqueness_of :name
   validates_presence_of :name
 
   validates_presence_of :name
 
+  # validate uniqueness of a name *within a given election*
+
   def <=>(other)
     self.name <=> other.name 
   end
   def <=>(other)
     self.name <=> other.name 
   end

Benjamin Mako Hill || Want to submit a patch?