Files
nairobi/app/models/poll.rb
2016-09-25 10:21:16 +02:00

6 lines
153 B
Ruby

class Poll < ActiveRecord::Base
has_many :booths
has_many :voters, through: :booths, class_name: "Poll::Voter"
validates :name, presence: true
end