class Candidate < ActiveRecord::Base
	belongs_to :position

	validates :first_name, presence: true, uniqueness: true
	validates :last_name, presence: true, uniqueness: true
	validates :slogan, presence: true
	validates :position, presence: true

	has_many :votes

	def to_s
		"#{first_name} #{last_name}"
	end
end
