Style/RedundantReturn

This commit is contained in:
David Cook
2024-01-10 09:38:35 +11:00
parent 7e00dbfd67
commit 2a3d498c13
2 changed files with 1 additions and 8 deletions

View File

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

View File

@@ -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") }