mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user