diff options
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 3342fb1fce9..21e8a6fec74 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -164,6 +164,10 @@ class Namespace < ApplicationRecord name = host.delete_suffix(gitlab_host) Namespace.where(parent_id: nil).by_path(name) end + + def top_most + where(parent_id: nil) + end end def package_settings @@ -400,6 +404,10 @@ class Namespace < ApplicationRecord !has_parent? end + def recent? + created_at >= 90.days.ago + end + private def all_projects_with_pages |