summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-08 14:53:23 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-11-08 14:53:23 +0000
commitc40714edd13566bfb51eb08273489172d8f630a2 (patch)
treea5aca88cf8b3f566be9c144c98c63b48d1ce01b0
parent7bcb299a3c8ad2a1ae3778482db954556d8417c0 (diff)
downloadredmine-c40714edd13566bfb51eb08273489172d8f630a2.tar.gz
redmine-c40714edd13566bfb51eb08273489172d8f630a2.zip
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
-rw-r--r--.rubocop_todo.yml2
-rw-r--r--app/models/issue_relation.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 78e4b84ab..dbad1d0ca 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -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.
diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb
index 24978148b..284f0052a 100644
--- a/app/models/issue_relation.rb
+++ b/app/models/issue_relation.rb
@@ -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)