summaryrefslogtreecommitdiff
path: root/app/models/namespace/root_storage_statistics.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/namespace/root_storage_statistics.rb')
-rw-r--r--app/models/namespace/root_storage_statistics.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/namespace/root_storage_statistics.rb b/app/models/namespace/root_storage_statistics.rb
index 56c430013ee..ae9b2f14343 100644
--- a/app/models/namespace/root_storage_statistics.rb
+++ b/app/models/namespace/root_storage_statistics.rb
@@ -8,6 +8,8 @@ class Namespace::RootStorageStatistics < ApplicationRecord
belongs_to :namespace
has_one :route, through: :namespace
+ scope :for_namespace_ids, ->(namespace_ids) { where(namespace_id: namespace_ids) }
+
delegate :all_projects, to: :namespace
def recalculate!