Update responses to use cable_ready

This commit is contained in:
Matt-Yorkley
2021-08-16 16:21:18 +01:00
parent 7fa9457550
commit 03abc395f2
3 changed files with 10 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ class SplitCheckoutController < ::BaseController
include OrderStockCheck
include Spree::BaseHelper
include CheckoutCallbacks
include CableReady::Broadcaster
helper 'terms_and_conditions'
helper 'checkout'
@@ -25,7 +26,10 @@ class SplitCheckoutController < ::BaseController
redirect_to_step
else
flash.now[:error] = I18n.t('split_checkout.errors.global')
render :edit, status: :unprocessable_entity
render operations: cable_car.replace(
selector: "#checkout", html: render_to_string(partial: "split_checkout/checkout", formats: [:html])
), status: :unprocessable_entity
end
end