Keep the `parent` method in `Project`
This commit is contained in:
parent
ee2744c60d
commit
cd8e1b85b6
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue