mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-26 05:55:15 +00:00
Remove unnecessary guard clause
Previously, payment actions that were listed without an associated `can_?` method were interpreted as supported. All payment methods are implementing all `can_?` methods for listed actions though. And I think that new payment methods should explicitely implement all `can_?` methods instead of relying on this hidden logic.
This commit is contained in:
@@ -155,8 +155,7 @@ module Spree
|
||||
return [] unless payment_method.respond_to?(:actions)
|
||||
|
||||
payment_method.actions.select do |action|
|
||||
!payment_method.respond_to?("can_#{action}?") ||
|
||||
payment_method.__send__("can_#{action}?", self)
|
||||
payment_method.__send__("can_#{action}?", self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user