Skip to content

Commit 5211df0

Browse files
committed
fixing relationship issues so users can be deleted
1 parent 1e33f24 commit 5211df0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/models/user.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,11 @@ class User < ActiveRecord::Base
185185
has_many :endorsements, foreign_key: 'endorsed_user_id'
186186
has_many :endorsings, foreign_key: 'endorsing_user_id', class_name: 'Endorsement'
187187
has_many :protips, dependent: :destroy
188-
has_many :likes
188+
has_many :likes, dependent: :destroy
189189
has_many :comments, dependent: :destroy
190+
has_many :sent_mails, dependent: :destroy
190191

191-
has_one :github_profile , class_name: 'Users::Github::Profile', dependent: :destroy
192+
has_one :github_profile, class_name: 'Users::Github::Profile', dependent: :destroy
192193
has_many :github_repositories, through: :github_profile , source: :repositories
193194

194195
belongs_to :team, class_name: 'Team'

0 commit comments

Comments
 (0)