summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-09-21 06:39:36 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-09-21 06:39:36 +0000
commit7df0230d673e8075aafad51f0ac7913fcc90d996 (patch)
tree2112ae5d20eb0f5deda0977676c44f2016b20b68
parenta6116a98c580d72f4202a557d22f2cf2ea85dcc5 (diff)
downloadredmine-7df0230d673e8075aafad51f0ac7913fcc90d996.tar.gz
redmine-7df0230d673e8075aafad51f0ac7913fcc90d996.zip
code cleanup: rubocop: fix Rails/Blank in app/helpers/issues_helper.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18497 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--.rubocop_todo.yml1
-rw-r--r--app/helpers/issues_helper.rb4
2 files changed, 1 insertions, 4 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 78139ede0..9d1432714 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -823,7 +823,6 @@ Rails/Blank:
- 'app/controllers/context_menus_controller.rb'
- 'app/controllers/repositories_controller.rb'
- 'app/controllers/watchers_controller.rb'
- - 'app/helpers/issues_helper.rb'
- 'app/helpers/queries_helper.rb'
- 'app/helpers/repositories_helper.rb'
- 'app/models/mailer.rb'
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 46e224f62..45ce59a52 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -536,9 +536,7 @@ module IssuesHelper
# Find the name of an associated record stored in the field attribute
def find_name_by_reflection(field, id)
- unless id.present?
- return nil
- end
+ return nil if id.blank?
@detail_value_name_by_reflection ||= Hash.new do |hash, key|
association = Issue.reflect_on_association(key.first.to_sym)
name = nil