0
0
Fork 0

Adding domain blocks

This commit is contained in:
Eugen Rochko 2016-10-09 14:48:43 +02:00
parent 52d7f862d3
commit 22a8801dbc
13 changed files with 92 additions and 10 deletions

View file

@ -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