Files
nairobi/app/models/poll/booth.rb
Juanjo Bazán 45d26f6dee refactors poll::voter
now belongs_to booth_assignment instead of to booth
2016-12-06 20:20:18 +01:00

8 lines
228 B
Ruby

class Poll
class Booth < ActiveRecord::Base
has_many :booth_assignments, class_name: "Poll::BoothAssignment"
has_many :polls, through: :booth_assignments
validates :name, presence: true, uniqueness: true
end
end