wedding-planner/app/use_cases/guests/update_use_case.rb
Manuel Bustillo 35bf272ac8
Some checks failed
Build Nginx-based docker image / build-static-assets (pull_request) Waiting to run
Add copyright notice / copyright_notice (pull_request) Successful in 4m39s
Run unit tests / unit_tests (pull_request) Failing after 22m29s
Restart simulations whenever a guest changes their invitation status
2024-11-03 09:26:25 +01:00

13 lines
330 B
Ruby

module Guests
class UpdateUseCase
def initialize(guest_ids:, params:)
Guest.where(id: guest_ids).update!(params)
# TODO: Not all status transitions may require a table re-arrangement
TablesArrangement.delete_all
ActiveJob.perform_all_later(50.times.map { TableSimulatorJob.new })
end
end
end