summaryrefslogtreecommitdiff
path: root/app/models/fork_network.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-03 17:06:09 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-07 11:46:23 +0200
commitf90b27da7777b0c72782d2a930f770e2f27757e2 (patch)
tree50f1d5b84e40c45c29a1be2b8150029da7db2d87 /app/models/fork_network.rb
parent8160550439d2027c12d5556c8ce1f8afd250628a (diff)
downloadgitlab-ce-f90b27da7777b0c72782d2a930f770e2f27757e2.tar.gz
Find forks within users/namespaces using fork memberships
Diffstat (limited to 'app/models/fork_network.rb')
-rw-r--r--app/models/fork_network.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/fork_network.rb b/app/models/fork_network.rb
index fd2510d0a4c..218e37a5312 100644
--- a/app/models/fork_network.rb
+++ b/app/models/fork_network.rb
@@ -8,4 +8,8 @@ class ForkNetwork < ActiveRecord::Base
def add_root_as_member
projects << root_project
end
+
+ def find_forks_in(other_projects)
+ projects.where(id: other_projects)
+ end
end