diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-21 14:59:13 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-21 14:59:13 +0100 |
commit | e8c27767aab0bf6c26d28944268a78fb5ac5d4e0 (patch) | |
tree | 1bbb416eb7736a43dd94ef0b64545a198567f4c1 /app/models/mention.rb | |
parent | 954f344cf7cba40a9d6493d2a76f5637beee2e6a (diff) |
Remove orphaned notifications, add scopes param to app create API
Diffstat (limited to 'app/models/mention.rb')
-rw-r--r-- | app/models/mention.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/mention.rb b/app/models/mention.rb index a3c8baf21..10a9cb1cd 100644 --- a/app/models/mention.rb +++ b/app/models/mention.rb @@ -4,6 +4,8 @@ class Mention < ApplicationRecord belongs_to :account, inverse_of: :mentions belongs_to :status + has_one :notification, as: :activity, dependent: :destroy + validates :account, :status, presence: true validates :account, uniqueness: { scope: :status } end |