Class: SpreeCmCommissioner::CheckInBulkCreator
- Inherits:
-
BaseInteractor
- Object
- BaseInteractor
- SpreeCmCommissioner::CheckInBulkCreator
- Defined in:
- app/interactors/spree_cm_commissioner/check_in_bulk_creator.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_bulk_creator.rb', line 5 def call context.fail!(message: :guest_ids_must_not_blank) if check_ins_attributes.blank? ActiveRecord::Base.transaction do context.check_ins = check_ins_attributes.map do |check_in_attributes| create_check_in_for(check_in_attributes) end end end |