Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
fb7a0f8c
Commit
fb7a0f8c
authored
Sep 19, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More descriptive method names for projects & groups
parent
31f77568
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
app/finders/group_children_finder.rb
app/finders/group_children_finder.rb
+5
-5
No files found.
app/finders/group_children_finder.rb
View file @
fb7a0f8c
...
...
@@ -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_sub
groups
GroupsFinder
.
new
(
current_user
,
parent:
parent_group
,
all_available:
true
).
execute
end
def
all_subgroups
Gitlab
::
GroupHierarchy
.
new
(
Group
.
where
(
id:
parent_group
)).
all_group
s
Gitlab
::
GroupHierarchy
.
new
(
Group
.
where
(
id:
parent_group
)).
base_and_descendant
s
end
def
subgroups_matching_filter
...
...
@@ -62,12 +62,12 @@ class GroupChildrenFinder
groups
=
if
params
[
:filter
]
subgroups_matching_filter
else
base_
groups
direct_sub
groups
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment