diff options
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index b3cefc01b99..3830379be3e 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -172,17 +172,7 @@ class Namespace < ActiveRecord::Base end def parents - @parents ||= - begin - parents = [] - - if parent - parents << parent - parents += parent.parents - end - - parents - end + @parents ||= parent ? parent.parents + [parent] : [] end private |