diff --git a/.rubocop_manual_todo.yml b/.rubocop_manual_todo.yml index c4298ef909..f68559cd67 100644 --- a/.rubocop_manual_todo.yml +++ b/.rubocop_manual_todo.yml @@ -87,6 +87,7 @@ Layout/LineLength: - Gemfile - lib/discourse/single_sign_on.rb - lib/open_food_network/available_payment_method_filter.rb + - lib/open_food_network/bulk_coop_report.rb - lib/open_food_network/customers_report.rb - lib/open_food_network/enterprise_fee_applicator.rb - lib/open_food_network/enterprise_fee_calculator.rb diff --git a/lib/open_food_network/available_payment_method_filter.rb b/lib/open_food_network/available_payment_method_filter.rb index 30fd0e326d..d42d4ae51b 100644 --- a/lib/open_food_network/available_payment_method_filter.rb +++ b/lib/open_food_network/available_payment_method_filter.rb @@ -2,9 +2,14 @@ module OpenFoodNetwork class AvailablePaymentMethodFilter def filter!(payment_methods) if stripe_enabled? - payment_methods.to_a.reject!{ |p| p.type.ends_with?("StripeConnect") && stripe_configuration_incomplete?(p) } + payment_methods.to_a.reject! do |payment_method| + payment_method.type.ends_with?("StripeConnect") && + stripe_configuration_incomplete?(payment_method) + end else - payment_methods.to_a.reject!{ |p| p.type.ends_with?("StripeConnect") } + payment_methods.to_a.reject! do |payment_method| + payment_method.type.ends_with?("StripeConnect") + end end end