Define an endpoint to remove guests #139

Merged
bustikiller merged 2 commits from delete-guest-endpoint into main 2024-11-17 17:28:14 +00:00
Showing only changes of commit f1d1ea825c - Show all commits

View File

@ -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