diff options
author | Reuben Pereira <reuben453@gmail.com> | 2018-07-05 21:13:46 +0530 |
---|---|---|
committer | Reuben Pereira <reuben453@gmail.com> | 2018-07-05 21:13:46 +0530 |
commit | a08b5144fe64cf7afde116334c91e95f54c9f4fb (patch) | |
tree | c0b0b14ec558f6c0cc08723904587a2d59680661 /lib/banzai/reference_parser | |
parent | 74c81cc50e7d4deff11e9777b9522f8adf8b3c96 (diff) | |
download | gitlab-ce-a08b5144fe64cf7afde116334c91e95f54c9f4fb.tar.gz |
Use map instead of collect in the ProjectParser#projects_readable_by_user function
Diffstat (limited to 'lib/banzai/reference_parser')
-rw-r--r-- | lib/banzai/reference_parser/project_parser.rb | 2 |
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 |