From 2a3d498c1365d88c1277b486172614766be08902 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 10 Jan 2024 09:38:35 +1100 Subject: [PATCH] Style/RedundantReturn --- .rubocop_todo.yml | 7 ------- app/models/spree/product.rb | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 033060ab5a..d886260035 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -944,13 +944,6 @@ Style/RedundantInterpolation: - 'lib/tasks/karma.rake' - 'spec/base_spec_helper.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowMultipleReturnValues. -Style/RedundantReturn: - Exclude: - - 'app/models/spree/product.rb' - # Offense count: 19 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: AllowedMethods, AllowedPatterns. diff --git a/app/models/spree/product.rb b/app/models/spree/product.rb index a2f70d4f77..4c9840a8fb 100755 --- a/app/models/spree/product.rb +++ b/app/models/spree/product.rb @@ -188,7 +188,7 @@ module Spree .with_permission(:add_to_order_cycle) .where(enterprises: { is_primary_producer: true }) .pluck(:parent_id) - return where('spree_products.supplier_id IN (?)', [enterprise.id] | permitted_producer_ids) + where('spree_products.supplier_id IN (?)', [enterprise.id] | permitted_producer_ids) } scope :active, lambda { where("spree_products.deleted_at IS NULL") }