Drop superfluous method

This commit is contained in:
Matt-Yorkley
2023-06-02 15:15:15 +01:00
parent 47b5a3fb1d
commit d7950617ec

View File

@@ -25,7 +25,9 @@ class SplitCheckoutController < ::BaseController
redirect_to_step_based_on_order unless params[:step]
check_step if params[:step]
flash_error_when_no_shipping_method_available if available_shipping_methods.none?
return if available_shipping_methods.any?
flash[:error] = I18n.t('split_checkout.errors.no_shipping_methods_available')
end
def update
@@ -102,10 +104,6 @@ class SplitCheckoutController < ::BaseController
end
end
def flash_error_when_no_shipping_method_available
flash[:error] = I18n.t('split_checkout.errors.no_shipping_methods_available')
end
def check_payments_adjustments
@order.payments.each(&:ensure_correct_adjustment)
end