Clean up subscriptions when user is deleted.
This commit is contained in:
parent
2953e0d19b
commit
e3fb9b1609
1 changed files with 1 additions and 0 deletions
|
@ -110,6 +110,7 @@ class User < ActiveRecord::Base
|
|||
has_many :notes, dependent: :destroy, foreign_key: :author_id
|
||||
has_many :merge_requests, dependent: :destroy, foreign_key: :author_id
|
||||
has_many :events, dependent: :destroy, foreign_key: :author_id, class_name: "Event"
|
||||
has_many :subscriptions, dependent: :destroy
|
||||
has_many :recent_events, -> { order "id DESC" }, foreign_key: :author_id, class_name: "Event"
|
||||
has_many :assigned_issues, dependent: :destroy, foreign_key: :assignee_id, class_name: "Issue"
|
||||
has_many :assigned_merge_requests, dependent: :destroy, foreign_key: :assignee_id, class_name: "MergeRequest"
|
||||
|
|
Loading…
Reference in a new issue