First steps to destroy shifts when booth_assignments are destroyed

This commit is contained in:
iagirre
2017-10-27 14:57:32 +02:00
parent b854d99248
commit 89425f50ef
3 changed files with 19 additions and 1 deletions

View File

@@ -8,5 +8,18 @@ class Poll
has_many :voters
has_many :partial_results
has_many :recounts
before_destroy :destroy_poll_shifts
def has_shifts?
end
private
def destroy_poll_shifts
# officers = poll.officers_in_booth(booth.id)
# Poll::Shift.where(officer_id: officers, booth_id: booth.id)
end
end
end