summaryrefslogtreecommitdiff
path: root/app/models/concerns/object_storable.rb
diff options
context:
space:
mode:
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