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

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