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:
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index a7d03c3688a..be39b894ef9 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -167,6 +167,7 @@ class Namespace < ApplicationRecord
scope :include_route, -> { includes(:route) }
scope :by_parent, -> (parent) { where(parent_id: parent) }
scope :filter_by_path, -> (query) { where('lower(path) = :query', query: query.downcase) }
+ scope :in_organization, -> (organization) { where(organization: organization) }
scope :with_statistics, -> do
joins('LEFT JOIN project_statistics ps ON ps.namespace_id = namespaces.id')