Remove orphaned notifications, add scopes param to app create API
This commit is contained in:
parent
954f344cf7
commit
e8c27767aa
6 changed files with 10 additions and 1 deletions
|
@ -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 }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue