removes poll-booth direct association

This commit is contained in:
Juanjo Bazán
2016-11-30 13:31:43 +01:00
parent ef52285121
commit 9583c052f0
4 changed files with 8 additions and 6 deletions

View File

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

View File

@@ -1,6 +1,5 @@
class Poll
class Booth < ActiveRecord::Base
belongs_to :poll
has_many :voters
has_many :officing_booths, dependent: :destroy
has_many :officers, through: :officing_booths