diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-07-06 12:43:51 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-07-06 12:43:51 -0400 |
commit | eef068754af7437baf327c5cb4e2b454ba40a617 (patch) | |
tree | 3583327140b2994432de317b4ac06d66b274b430 /app/models/issue.rb | |
parent | 9eeba8fb49c5da7cf0b2c22bc33cbd33a83918ed (diff) | |
parent | 9274c3c1598f3ff32339e681d5812feeb0f62605 (diff) | |
download | gitlab-ce-eef068754af7437baf327c5cb4e2b454ba40a617.tar.gz |
Merge branch 'master' into rs-sign_in
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 3a9a6dba601..01f985823e1 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -23,9 +23,14 @@ class Issue < ActiveRecord::Base belongs_to :project belongs_to :moved_to, class_name: 'Issue' - has_many :events, as: :target, dependent: :destroy + has_many :events, as: :target, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent - has_many :merge_requests_closing_issues, class_name: 'MergeRequestsClosingIssues', dependent: :delete_all + has_many :merge_requests_closing_issues, + class_name: 'MergeRequestsClosingIssues', + dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent + + has_many :issue_assignees + has_many :assignees, class_name: "User", through: :issue_assignees has_many :issue_assignees has_many :assignees, class_name: "User", through: :issue_assignees @@ -295,11 +300,7 @@ class Issue < ActiveRecord::Base end def expire_etag_cache - key = Gitlab::Routing.url_helpers.realtime_changes_namespace_project_issue_path( - project.namespace, - project, - self - ) + key = Gitlab::Routing.url_helpers.realtime_changes_project_issue_path(project, self) Gitlab::EtagCaching::Store.new.touch(key) end end |