summaryrefslogtreecommitdiff
path: root/app/finders/projects_finder.rb
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-08-12 15:52:58 +0200
committerAhmad Sherif <me@ahmadsherif.com>2016-08-15 12:49:31 +0200
commit76db0dc115316e53ed7d2189cc8789f0a0cef3c2 (patch)
treec0557300cb94ccb44930c17df33f8d5409b1bb4d /app/finders/projects_finder.rb
parentd13c36f72de6b1c56e2063dafddd14ecbb430b9a (diff)
downloadgitlab-ce-76db0dc115316e53ed7d2189cc8789f0a0cef3c2.tar.gz
Pass project IDs relation to ProjectsFinder instead of using a block
Diffstat (limited to 'app/finders/projects_finder.rb')
-rw-r--r--app/finders/projects_finder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb
index 56877b6d75a..c7911736812 100644
--- a/app/finders/projects_finder.rb
+++ b/app/finders/projects_finder.rb
@@ -1,7 +1,7 @@
class ProjectsFinder < UnionFinder
- def execute(current_user = nil, options = {}, &block)
+ def execute(current_user = nil, project_ids_relation = nil)
segments = all_projects(current_user)
- segments.map!(&block) if block
+ segments.map! { |s| s.where(id: project_ids_relation) } if project_ids_relation
find_union(segments, Project)
end