about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-09 14:48:43 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-09 14:48:59 +0200
commit22a8801dbc77d2d01b326a7cb89d1a28b054e073 (patch)
tree11a3a99e98df33cbb73da818419fa0227b1dc664 /app/models/account.rb
parent52d7f862d365acfd4eacbe448238699d9662708d (diff)
Adding domain blocks
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 12e7be05d..e43d51b1c 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -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