wedding-planner/app/use_cases/guests/update_use_case.rb
Manuel Bustillo 86e982164d
Some checks failed
Build Nginx-based docker image / build-static-assets (pull_request) Waiting to run
Run unit tests / unit_tests (pull_request) Failing after 16m52s
Add copyright notice / copyright_notice (pull_request) Failing after 17m30s
Add copyright notice
2024-11-03 08:31:58 +00:00

15 lines
368 B
Ruby

# Copyright (C) 2024 Manuel Bustillo
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