From d7950617ecf3f5e38100acf404134032909aaf5f Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:15:15 +0100 Subject: [PATCH] Drop superfluous method --- app/controllers/split_checkout_controller.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/controllers/split_checkout_controller.rb b/app/controllers/split_checkout_controller.rb index 7b3d57977b..c74b3f0ba1 100644 --- a/app/controllers/split_checkout_controller.rb +++ b/app/controllers/split_checkout_controller.rb @@ -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