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>2021-03-31 18:10:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-31 18:10:27 +0300
commit5facc34f44ce8736078127a5df174a7b52d922b4 (patch)
treeb93fbe904139121e82870cc40e5ab240a97b1f08 /app/models/concerns/object_storable.rb
parentea1dcaef18edf97b3ac73892d64ebaf5eecd7f68 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/object_storable.rb')
-rw-r--r--app/models/concerns/object_storable.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/concerns/object_storable.rb b/app/models/concerns/object_storable.rb
new file mode 100644
index 00000000000..c13dddc0b88
--- /dev/null
+++ b/app/models/concerns/object_storable.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module ObjectStorable
+ extend ActiveSupport::Concern
+
+ included do
+ scope :with_files_stored_locally, -> { where(klass::STORE_COLUMN => ObjectStorage::Store::LOCAL) }
+ scope :with_files_stored_remotely, -> { where(klass::STORE_COLUMN => ObjectStorage::Store::REMOTE) }
+ end
+end