about summary refs log tree commit diff
path: root/app/models/media_attachment.rb
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-05-22 13:36:21 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-22 19:36:21 +0200
commitec34ec63b195d94a1ee43ac584ff74d84822222f (patch)
treef135626f8a790e78fc86a2102d58f5f433e2b080 /app/models/media_attachment.rb
parent4a4733b397c9a5d3a69d7b2156f4f8aa62ff0c32 (diff)
Specs for cleanup workers (#3235)
* Add spec files for feed and media cleanup workers

* Add coverage for feed and media cleanup schedulers

* Clean up feed and media cleanup workers
Diffstat (limited to 'app/models/media_attachment.rb')
-rw-r--r--app/models/media_attachment.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index c29a66eb2..cf73c22b8 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -55,6 +55,7 @@ class MediaAttachment < ApplicationRecord
   validates :account, presence: true
 
   scope :attached, -> { where.not(status_id: nil) }
+  scope :unattached, -> { where(status_id: nil) }
   scope :local, -> { where(remote_url: '') }
   default_scope { order(id: :asc) }