diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-09-21 06:39:36 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-09-21 06:39:36 +0000 |
commit | 7df0230d673e8075aafad51f0ac7913fcc90d996 (patch) | |
tree | 2112ae5d20eb0f5deda0977676c44f2016b20b68 /app | |
parent | a6116a98c580d72f4202a557d22f2cf2ea85dcc5 (diff) | |
download | redmine-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
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/issues_helper.rb | 4 |
1 files changed, 1 insertions, 3 deletions
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 |