adds poll/booth_assigments

This commit is contained in:
Juanjo Bazán
2016-11-30 13:46:05 +01:00
parent 9583c052f0
commit bd59ba3b82
5 changed files with 27 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
class Poll < ActiveRecord::Base
has_many :booth_assigments
has_many :booths, through: :booth_assigments, class_name: "Poll::BoothAssignment"
has_many :voters, through: :booths, class_name: "Poll::Voter"
has_many :officers, through: :booths, class_name: "Poll::Officer"
has_many :questions