Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 12:09:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 12:09:13 +0300
commit1ac794623a8be5dee111716a44dd04ff708f3541 (patch)
tree6c18f9fbe0bd9978bd3e8d9b083d3a0ca180686e /app/models/namespace.rb
parent5247fe0bef72fa922841a79d5dbefb47d95112fa (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index efe14a3e614..99212d09b8e 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -68,6 +68,7 @@ class Namespace < ApplicationRecord
after_destroy :rm_dir
scope :for_user, -> { where('type IS NULL') }
+ scope :sort_by_type, -> { order(Gitlab::Database.nulls_first_order(:type)) }
scope :with_statistics, -> do
joins('LEFT JOIN project_statistics ps ON ps.namespace_id = namespaces.id')
@@ -326,7 +327,10 @@ class Namespace < ApplicationRecord
end
def pages_virtual_domain
- Pages::VirtualDomain.new(all_projects_with_pages, trim_prefix: full_path)
+ Pages::VirtualDomain.new(
+ all_projects_with_pages.includes(:route, :project_feature),
+ trim_prefix: full_path
+ )
end
def closest_setting(name)