summaryrefslogtreecommitdiffstats
path: root/app/helpers/members_helper.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-01-17 01:38:27 +0000
committerGo MAEDA <maeda@farend.jp>2023-01-17 01:38:27 +0000
commit0b6f4c6811a4a4e823674e3bb8b970ee46a9194b (patch)
tree341119beb1c247727c68ba9913a7a2bfc3fa3006 /app/helpers/members_helper.rb
parent97d07eb28573060085352e0e9046be16e29f5bfd (diff)
downloadredmine-0b6f4c6811a4a4e823674e3bb8b970ee46a9194b.tar.gz
redmine-0b6f4c6811a4a4e823674e3bb8b970ee46a9194b.zip
Ruby 2.7: Fix RuboCop offense Performance/MapCompact (#38134).
git-svn-id: https://svn.redmine.org/redmine/trunk@22055 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/members_helper.rb')
-rw-r--r--app/helpers/members_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb
index e7e2e09e0..0e542768c 100644
--- a/app/helpers/members_helper.rb
+++ b/app/helpers/members_helper.rb
@@ -50,13 +50,13 @@ module MembersHelper
# Returns inheritance information for an inherited member role
def render_role_inheritance(member, role)
- content = member.role_inheritance(role).map do |h|
+ content = member.role_inheritance(role).filter_map do |h|
if h.is_a?(Project)
l(:label_inherited_from_parent_project)
elsif h.is_a?(Group)
l(:label_inherited_from_group, :name => h.name.to_s)
end
- end.compact.uniq
+ end.uniq
if content.present?
content_tag('em', content.join(", "), :class => "info")