1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

code cleanup: rubocop: fix Style/WhenThen in app/models/role.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18724 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-10-17 16:40:43 +00:00
parent 57923d0450
commit 9cf1621083
2 changed files with 4 additions and 4 deletions

View File

@ -1464,7 +1464,6 @@ Style/VariableInterpolation:
Style/WhenThen:
Exclude:
- 'app/models/issue_query.rb'
- 'app/models/role.rb'
# Cop supports --auto-correct.
Style/WhileUntilModifier:

View File

@ -160,9 +160,10 @@ class Role < ActiveRecord::Base
def name
case builtin
when 1; l(:label_role_non_member, :default => read_attribute(:name))
when 2; l(:label_role_anonymous, :default => read_attribute(:name))
else; read_attribute(:name)
when 1 then l(:label_role_non_member, :default => read_attribute(:name))
when 2 then l(:label_role_anonymous, :default => read_attribute(:name))
else
read_attribute(:name)
end
end