diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2016-12-16 09:41:23 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2016-12-16 09:41:23 +0000 |
commit | ecd0c1757da536c5b522dad563b6621d0d5634b1 (patch) | |
tree | e6dfe69feb913ba40cf8e491217606b490c946d0 /app/models/namespace.rb | |
parent | 49a70d1e45b4f841379db059177856671c65159c (diff) | |
parent | 82f9957d466810314b8f3af672bcdd706905007a (diff) | |
download | gitlab-ce-ecd0c1757da536c5b522dad563b6621d0d5634b1.tar.gz |
Merge branch 'dz-nested-groups-title-ui' into 'master'
UI improvements for nested group feature
See merge request !8062
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index f0479d94986..fd42f2328d8 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -161,6 +161,19 @@ class Namespace < ActiveRecord::Base end end + def full_name + @full_name ||= + if parent + parent.full_name + ' / ' + name + else + name + end + end + + def parents + @parents ||= parent ? parent.parents + [parent] : [] + end + private def repository_storage_paths |