summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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