Class: SpreeCmCommissioner::CheckInDestroyer
- Inherits:
-
BaseInteractor
- Object
- BaseInteractor
- SpreeCmCommissioner::CheckInDestroyer
- Defined in:
- app/interactors/spree_cm_commissioner/check_in_destroyer.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/interactors/spree_cm_commissioner/check_in_destroyer.rb', line 5 def call context.fail!(message: :guest_ids_must_not_blank) if guest_ids.blank? ActiveRecord::Base.transaction do context.check_ins = guest_ids.map do |guest_id| destroy_check_in_for(guest_id) end.compact end end |