From 8bee48df6d70e00d86d793ded74a534f993d5292 Mon Sep 17 00:00:00 2001 From: Ana Nunes da Silva Date: Thu, 28 Mar 2024 19:39:49 +0000 Subject: [PATCH] Fix duplicate branch in Enterprise#category method non_producer_sells_any and non_producer_sells_own have the same category --- .rubocop_todo.yml | 2 +- app/models/enterprise.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3c85c436c8..9d3737f407 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -28,7 +28,7 @@ Lint/ConstantDefinitionInBlock: Lint/DuplicateBranch: Exclude: # - 'app/helpers/spree/admin/base_helper.rb' - - 'app/models/enterprise.rb' + # - 'app/models/enterprise.rb' - 'app/models/spree/calculator.rb' - 'app/models/spree/preference.rb' - 'app/models/spree/preferences/preferable.rb' diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index 7f9ab5a965..0d5ad5e4ec 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -369,10 +369,10 @@ class Enterprise < ApplicationRecord :producer_shop # Producer with shopfront and supplies other hubs. when "producer_sells_none" :producer # Producer only supplies through others. - when "non_producer_sells_any" - :hub # Hub selling others products in order cycles. - when "non_producer_sells_own" - :hub # Wholesaler selling through own shopfront? Does this need a separate name or even exist? + when "non_producer_sells_any", "non_producer_sells_own" + # Hub selling others products in order cycles + # Or Wholesaler selling through own shopfront? Does this need a separate name or even exist? + :hub when "non_producer_sells_none" :hub_profile # Hub selling outside the system. end