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/follow.rb | |
parent | 954f344cf7cba40a9d6493d2a76f5637beee2e6a (diff) |
Remove orphaned notifications, add scopes param to app create API
Diffstat (limited to 'app/models/follow.rb')
-rw-r--r-- | app/models/follow.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/follow.rb b/app/models/follow.rb index c918dabf2..cc5bceb75 100644 --- a/app/models/follow.rb +++ b/app/models/follow.rb @@ -7,6 +7,8 @@ class Follow < ApplicationRecord belongs_to :account belongs_to :target_account, class_name: 'Account' + has_one :notification, as: :activity, dependent: :destroy + validates :account, :target_account, presence: true validates :account_id, uniqueness: { scope: :target_account_id } |