Fix duplicate branch in Enterprise#category method

non_producer_sells_any and non_producer_sells_own have the same category
This commit is contained in:
Ana Nunes da Silva
2024-03-28 19:39:49 +00:00
parent eaf32226a4
commit 8bee48df6d
2 changed files with 5 additions and 5 deletions

View File

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

View File

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