Fix some more rubocop issues

This commit is contained in:
Luis Ramos
2020-08-19 00:55:28 +01:00
parent 1847b62cf4
commit 586e8a9abe
2 changed files with 8 additions and 2 deletions

View File

@@ -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

View File

@@ -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