From 00cc8da2fce84e36e9076416aac03ae0a698fe68 Mon Sep 17 00:00:00 2001 From: James Wu Date: Thu, 26 Jan 2023 21:51:55 +0900 Subject: [PATCH] Fix rubocop class length error --- app/models/spree/payment_method.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) }