Recalculate simulations after removing a guest
This commit is contained in:
parent
7542c6361c
commit
f1d1ea825c
@ -36,6 +36,7 @@ class Guest < ApplicationRecord
|
|||||||
scope :potential, -> { where.not(status: %i[declined considered]) }
|
scope :potential, -> { where.not(status: %i[declined considered]) }
|
||||||
|
|
||||||
after_save :recalculate_simulations, if: :saved_change_to_status?
|
after_save :recalculate_simulations, if: :saved_change_to_status?
|
||||||
|
after_destroy :recalculate_simulations
|
||||||
|
|
||||||
has_many :seats, dependent: :delete_all
|
has_many :seats, dependent: :delete_all
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user