mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +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:
parent
57923d0450
commit
9cf1621083
@ -1464,7 +1464,6 @@ Style/VariableInterpolation:
|
||||
Style/WhenThen:
|
||||
Exclude:
|
||||
- 'app/models/issue_query.rb'
|
||||
- 'app/models/role.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
Style/WhileUntilModifier:
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user