From 94d0a42ac17609af8e4cc168198e34d45653179f Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sun, 3 Nov 2024 13:56:10 +0100 Subject: [PATCH] Fix undefined method --- app/use_cases/guests/update_use_case.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/use_cases/guests/update_use_case.rb b/app/use_cases/guests/update_use_case.rb index 9a5cc66..d31a982 100644 --- a/app/use_cases/guests/update_use_case.rb +++ b/app/use_cases/guests/update_use_case.rb @@ -2,7 +2,13 @@ module Guests class UpdateUseCase + private attr_reader :guest_ids, :params def initialize(guest_ids:, params:) + @guest_ids = guest_ids + @params = params + end + + def call Guest.where(id: guest_ids).update!(params) # TODO: Not all status transitions may require a table re-arrangement -- 2.47.1