Define an endpoint to remove guests #139
@ -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