Add and apply Lint/DuplicateBranch rubocop rule

This rule was introduced in rubocop 1.3.0.
This commit is contained in:
Javi Martín
2021-08-11 16:17:04 +02:00
parent 2c76f265f8
commit f90c23ca88
2 changed files with 4 additions and 3 deletions

View File

@@ -160,6 +160,9 @@ Lint/BooleanSymbol:
Lint/ConstantDefinitionInBlock: Lint/ConstantDefinitionInBlock:
Enabled: true Enabled: true
Lint/DuplicateBranch:
Enabled: true
Lint/DuplicateMethods: Lint/DuplicateMethods:
Enabled: true Enabled: true

View File

@@ -187,12 +187,10 @@ class Budget < ApplicationRecord
def investments_orders def investments_orders
case phase case phase
when "accepting", "reviewing" when "accepting", "reviewing", "finished"
%w[random] %w[random]
when "publishing_prices", "balloting", "reviewing_ballots" when "publishing_prices", "balloting", "reviewing_ballots"
%w[random price] %w[random price]
when "finished"
%w[random]
else else
%w[random confidence_score] %w[random confidence_score]
end end