diff --git a/app/models/spree/payment_method.rb b/app/models/spree/payment_method.rb index ac46c864c8..964065b605 100644 --- a/app/models/spree/payment_method.rb +++ b/app/models/spree/payment_method.rb @@ -41,9 +41,8 @@ module Spree where(id: non_unique_matches.map(&:id)) } - scope :for_distributor, lambda { |distributor| - joins(:distributors). - where('enterprises.id = ?', distributor) + scope :for_distributor, ->(distributor) { + joins(:distributors).where('enterprises.id = ?', distributor) } scope :for_subscriptions, -> { where(type: Subscription::ALLOWED_PAYMENT_METHOD_TYPES) }