|
@@ -9,7 +9,7 @@ class User < ApplicationRecord
|
9
|
9
|
has_many :joined_user_activities
|
10
|
10
|
has_many :activities, :through => :joined_user_activities
|
11
|
11
|
|
12
|
|
- has_many :tasks, foreign_key: 'owner_id', class_name: 'Task'
|
|
12
|
+ has_many :tasks, foreign_key: 'owner_id', class_name: 'Task', dependent: :destroy
|
13
|
13
|
|
14
|
14
|
has_many :memberships, foreign_key: :member_id, dependent: :destroy
|
15
|
15
|
has_many :teams, through: :memberships
|