Ruby 2.7: Fix RuboCop offense Performance/MapCompact (#38134).

git-svn-id: https://svn.redmine.org/redmine/trunk@22055 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-01-17 01:38:27 +00:00
parent 97d07eb285
commit 0b6f4c6811
24 changed files with 35 additions and 36 deletions

View File

@@ -405,7 +405,7 @@ class ApplicationController < ActionController::Base
raise ActiveRecord::RecordNotFound if @issues.empty?
raise Unauthorized unless @issues.all?(&:visible?)
@projects = @issues.collect(&:project).compact.uniq
@projects = @issues.filter_map(&:project).uniq
@project = @projects.first if @projects.size == 1
rescue ActiveRecord::RecordNotFound
render_404