diff --git a/app/controllers/concerns/cablecar_responses.rb b/app/controllers/concerns/cablecar_responses.rb new file mode 100644 index 0000000000..b98d158dae --- /dev/null +++ b/app/controllers/concerns/cablecar_responses.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module CablecarResponses + extend ActiveSupport::Concern + + included do + include CableReady::Broadcaster + end + + private + + def partial(path, options = {}) + { html: render_to_string(partial: path, **options) } + end +end diff --git a/app/controllers/split_checkout_controller.rb b/app/controllers/split_checkout_controller.rb index c8c91dcf5a..63b2405aa4 100644 --- a/app/controllers/split_checkout_controller.rb +++ b/app/controllers/split_checkout_controller.rb @@ -8,7 +8,7 @@ class SplitCheckoutController < ::BaseController include OrderStockCheck include Spree::BaseHelper include CheckoutCallbacks - include CableReady::Broadcaster + include CablecarResponses helper 'terms_and_conditions' helper 'checkout' @@ -36,10 +36,6 @@ class SplitCheckoutController < ::BaseController private - def partial(path, options = {}) - { html: render_to_string(partial: path, **options) } - end - def clear_invalid_payments @order.payments.with_state(:invalid).delete_all end