Adding domain blocks
This commit is contained in:
parent
52d7f862d3
commit
22a8801dbc
13 changed files with 92 additions and 10 deletions
|
@ -24,10 +24,10 @@ class Account < ApplicationRecord
|
|||
validates :note, length: { maximum: 124 }, if: 'local?'
|
||||
|
||||
# Timelines
|
||||
has_many :stream_entries, inverse_of: :account
|
||||
has_many :statuses, inverse_of: :account
|
||||
has_many :favourites, inverse_of: :account
|
||||
has_many :mentions, inverse_of: :account
|
||||
has_many :stream_entries, inverse_of: :account, dependent: :destroy
|
||||
has_many :statuses, inverse_of: :account, dependent: :destroy
|
||||
has_many :favourites, inverse_of: :account, dependent: :destroy
|
||||
has_many :mentions, inverse_of: :account, dependent: :destroy
|
||||
|
||||
# Follow relations
|
||||
has_many :active_relationships, class_name: 'Follow', foreign_key: 'account_id', dependent: :destroy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue