summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorReuben Pereira <reuben453@gmail.com>2018-07-05 21:13:46 +0530
committerReuben Pereira <reuben453@gmail.com>2018-07-05 21:13:46 +0530
commita08b5144fe64cf7afde116334c91e95f54c9f4fb (patch)
treec0b0b14ec558f6c0cc08723904587a2d59680661 /lib/banzai
parent74c81cc50e7d4deff11e9777b9522f8adf8b3c96 (diff)
downloadgitlab-ce-a08b5144fe64cf7afde116334c91e95f54c9f4fb.tar.gz
Use map instead of collect in the ProjectParser#projects_readable_by_user function
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/reference_parser/project_parser.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/reference_parser/project_parser.rb b/lib/banzai/reference_parser/project_parser.rb
index 787cb671b2d..2bf02e3df53 100644
--- a/lib/banzai/reference_parser/project_parser.rb
+++ b/lib/banzai/reference_parser/project_parser.rb
@@ -29,7 +29,7 @@ module Banzai
# projects - The projects to reduce down to those readable by the user.
# user - The User for which to check the projects
def projects_readable_by_user(projects, user)
- Project.public_or_visible_to_user(user).where("projects.id IN (?)", projects.collect(&:id)).pluck(:id)
+ Project.public_or_visible_to_user(user).where("projects.id IN (?)", projects.map(&:id)).pluck(:id)
end
end
end