gitlab-org--gitlab-foss/app/finders/fork_projects_finder.rb
Mark Fletcher 5f331ab700 Introduce ForkProjectsFinder class
* Will dry up the code to find projects between the ForksController and the API
2017-09-20 08:27:16 +10:00

6 lines
261 B
Ruby

class ForkProjectsFinder < ProjectsFinder
def initialize(project, params: {}, current_user: nil)
project_ids = project.forks.includes(:creator).select(:id)
super(params: params, current_user: current_user, project_ids_relation: project_ids)
end
end