diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-19 12:46:07 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 23:49:41 +0300 |
commit | fb7a0f8c335631e1cb8c8f91e135e49528fad70e (patch) | |
tree | 8929561ac79e2638f61e943690732d5524a1f70f /app/finders | |
parent | 31f775689396722e38de20157b46a75b1fe40582 (diff) |
More descriptive method names for projects & groups
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/group_children_finder.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/finders/group_children_finder.rb b/app/finders/group_children_finder.rb index 93a218ee5b3..7c7e7f804ec 100644 --- a/app/finders/group_children_finder.rb +++ b/app/finders/group_children_finder.rb @@ -41,14 +41,14 @@ class GroupChildrenFinder @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 - 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,12 +62,12 @@ class GroupChildrenFinder groups = if params[:filter] subgroups_matching_filter else - base_groups + direct_subgroups 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 @@ class GroupChildrenFinder projects = if params[:filter] projects_matching_filter else - base_projects + direct_child_projects end projects.sort(params[:sort]) end |