Commit 1e4e5181 authored by Bob Van Landuyt's avatar Bob Van Landuyt
Browse files

More descriptive method names for projects & groups

parent d4830ba06b8d
......@@ -41,10 +41,10 @@
@children ||= subgroups.with_route.includes(:route, :parent) + projects.with_route.includes(:route, :namespace)
end
def base_groups
def direct_subgroups
GroupsFinder.new(current_user,
parent: parent_group,
all_available: true).execute
end
def all_subgroups
......@@ -45,10 +45,10 @@
GroupsFinder.new(current_user,
parent: parent_group,
all_available: true).execute
end
def all_subgroups
Gitlab::GroupHierarchy.new(Group.where(id: parent_group)).all_groups
Gitlab::GroupHierarchy.new(Group.where(id: parent_group)).base_and_descendants
end
def subgroups_matching_filter
......@@ -62,8 +62,8 @@
groups = if params[:filter]
subgroups_matching_filter
else
base_groups
direct_subgroups
end
groups.sort(params[:sort])
end
......@@ -66,8 +66,8 @@
end
groups.sort(params[:sort])
end
def base_projects
def direct_child_projects
GroupProjectsFinder.new(group: parent_group, params: params, current_user: current_user).execute
end
......@@ -83,7 +83,7 @@
projects = if params[:filter]
projects_matching_filter
else
base_projects
direct_child_projects
end
projects.sort(params[:sort])
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment