summaryrefslogtreecommitdiffstats
path: root/app/controllers/context_menus_controller.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/controllers/context_menus_controller.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/controllers/context_menus_controller.rb')
-rw-r--r--app/controllers/context_menus_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb
index 848e8de2a..b3f775156 100644
--- a/app/controllers/context_menus_controller.rb
+++ b/app/controllers/context_menus_controller.rb
@@ -74,7 +74,7 @@ class ContextMenusController < ApplicationController
@time_entry = @time_entries.first
end
- @projects = @time_entries.collect(&:project).compact.uniq
+ @projects = @time_entries.filter_map(&:project).uniq
@project = @projects.first if @projects.size == 1
@activities = @projects.map(&:activities).reduce(:&)