about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-21 14:59:13 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-21 14:59:13 +0100
commite8c27767aab0bf6c26d28944268a78fb5ac5d4e0 (patch)
tree1bbb416eb7736a43dd94ef0b64545a198567f4c1 /app/models/status.rb
parent954f344cf7cba40a9d6493d2a76f5637beee2e6a (diff)
Remove orphaned notifications, add scopes param to app create API
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index a5c3e19ba..1bf4b49c9 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -16,6 +16,8 @@ class Status < ApplicationRecord
   has_many :media_attachments, dependent: :destroy
   has_and_belongs_to_many :tags
 
+  has_one :notification, as: :activity, dependent: :destroy
+
   validates :account, presence: true
   validates :uri, uniqueness: true, unless: 'local?'
   validates :text, presence: true, length: { maximum: 500 }, if: proc { |s| s.local? && !s.reblog? }