diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-09-20 22:52:20 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-09-20 22:52:20 +0300 |
commit | 68e1b5bbc076398b2886fe1fe2cc440a52d7cab1 (patch) | |
tree | ec3584c5375990b68f24b94365a1184ac0949c07 /app/models/issue.rb | |
parent | 918e589c2b29c18d9fe3a8e6c93a3f490c86beb1 (diff) |
Use the `IssuableBaseService` lifecycle hooks to cache `MergeRequestsClosingIssues`
- Instead of overriding `create` and `update` in `MergeRequests::BaseService`
- Get all merge request service specs passing
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 25ba38a1cff..abd58e0454a 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -23,7 +23,7 @@ class Issue < ActiveRecord::Base has_many :events, as: :target, dependent: :destroy - has_many :merge_requests_closing_issues, class_name: 'MergeRequestsClosingIssues' + has_many :merge_requests_closing_issues, class_name: 'MergeRequestsClosingIssues', dependent: :delete_all validates :project, presence: true |