changes officer assignments to polls via new model/relation

This commit is contained in:
Juanjo Bazán
2016-12-06 14:33:06 +01:00
parent 60e7ac20e7
commit 891516a0b9
10 changed files with 72 additions and 138 deletions

View File

@@ -2,5 +2,8 @@ class Poll
class BoothAssignment < ActiveRecord::Base
belongs_to :booth
belongs_to :poll
has_many :officer_assignments, class_name: "Poll::OfficerAssignment", dependent: :destroy
has_many :officers, through: :officer_assignments
end
end