mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
cleanup: rubocop: fix Style/MultilineTernaryOperator and Style/NestedTernaryOperator in app/models/issue_relation.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18961 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7bcb299a3c
commit
c40714edd1
@ -1245,7 +1245,6 @@ Style/MultilineTernaryOperator:
|
||||
- 'app/controllers/workflows_controller.rb'
|
||||
- 'app/helpers/settings_helper.rb'
|
||||
- 'app/models/issue_query.rb'
|
||||
- 'app/models/issue_relation.rb'
|
||||
- 'lib/redmine/ciphering.rb'
|
||||
- 'lib/redmine/scm/adapters/filesystem_adapter.rb'
|
||||
- 'lib/redmine/scm/adapters/git_adapter.rb'
|
||||
@ -1298,7 +1297,6 @@ Style/NestedParenthesizedCalls:
|
||||
Style/NestedTernaryOperator:
|
||||
Exclude:
|
||||
- 'app/helpers/queries_helper.rb'
|
||||
- 'app/models/issue_relation.rb'
|
||||
- 'app/models/journal.rb'
|
||||
|
||||
# Cop supports --auto-correct.
|
||||
|
||||
@ -152,9 +152,11 @@ class IssueRelation < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def label_for(issue)
|
||||
TYPES[relation_type] ?
|
||||
TYPES[relation_type][(self.issue_from_id == issue.id) ? :name : :sym_name] :
|
||||
:unknow
|
||||
if TYPES[relation_type]
|
||||
TYPES[relation_type][(self.issue_from_id == issue.id) ? :name : :sym_name]
|
||||
else
|
||||
:unknow
|
||||
end
|
||||
end
|
||||
|
||||
def to_s(issue=nil)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user