Recalculate simulations after removing a guest
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 56s
Add copyright notice / copyright_notice (pull_request) Successful in 1m20s
Run unit tests / unit_tests (pull_request) Successful in 2m4s

This commit is contained in:
Manuel Bustillo 2024-11-17 18:25:38 +01:00
parent 7542c6361c
commit f1d1ea825c

View File

@ -36,6 +36,7 @@ class Guest < ApplicationRecord
scope :potential, -> { where.not(status: %i[declined considered]) }
after_save :recalculate_simulations, if: :saved_change_to_status?
after_destroy :recalculate_simulations
has_many :seats, dependent: :delete_all