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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
cd8e1b85
Commit
cd8e1b85
authored
Sep 22, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep the `parent` method in `Project`
parent
ee2744c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
app/models/concerns/group_descendant.rb
app/models/concerns/group_descendant.rb
+0
-8
app/models/project.rb
app/models/project.rb
+4
-0
No files found.
app/models/concerns/group_descendant.rb
View file @
cd8e1b85
...
...
@@ -3,14 +3,6 @@ module GroupDescendant
expand_hierarchy_for_child
(
self
,
self
,
hierarchy_base
)
end
def
parent
if
self
.
is_a?
(
Project
)
namespace
else
super
end
end
def
expand_hierarchy_for_child
(
child
,
hierarchy
,
hierarchy_base
)
if
child
.
parent
.
nil?
&&
hierarchy_base
.
present?
raise
ArgumentError
.
new
(
'specified base is not part of the tree'
)
...
...
app/models/project.rb
View file @
cd8e1b85
...
...
@@ -1521,6 +1521,10 @@ class Project < ActiveRecord::Base
map
.
public_path_for_source_path
(
path
)
end
def
parent
namespace
end
def
parent_changed?
namespace_id_changed?
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