Use map instead of collect in the ProjectParser#projects_readable_by_user function
This commit is contained in:
parent
74c81cc50e
commit
a08b5144fe
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue