From d9de35799d5389d7972c0bac3064be5443aefedc Mon Sep 17 00:00:00 2001 From: Cillian O'Ruanaidh Date: Mon, 20 Jun 2022 21:39:47 +0100 Subject: [PATCH] Array difference operator is neater than reject in app/views/admin/order_cycles/checkout_options.html.haml Co-authored-by: Maikel --- app/views/admin/order_cycles/checkout_options.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/order_cycles/checkout_options.html.haml b/app/views/admin/order_cycles/checkout_options.html.haml index 0e27b35394..01ebd9e041 100644 --- a/app/views/admin/order_cycles/checkout_options.html.haml +++ b/app/views/admin/order_cycles/checkout_options.html.haml @@ -22,8 +22,8 @@ %th= t('.shipping_methods') %th= t('.payment_methods') - @order_cycle.distributors.each do |distributor| - - payment_methods = @order_cycle.attachable_payment_methods.where("distributor_id = ?", distributor.id).reject { |payment_method| shared_payment_methods.include?(payment_method) } - - shipping_methods = @order_cycle.attachable_shipping_methods.where("distributor_id = ?", distributor.id).reject { |shipping_method| shared_shipping_methods.include?(shipping_method) } + - payment_methods = @order_cycle.attachable_payment_methods.where("distributor_id = ?", distributor.id) - shared_payment_methods + - shipping_methods = @order_cycle.attachable_shipping_methods.where("distributor_id = ?", distributor.id) - shared_shipping_methods %tr %td= distributor.name %td