diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-16 15:06:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-16 15:06:26 +0000 |
commit | 84727c8209a4412e21111a07f99b0438b03232de (patch) | |
tree | 1fcfa02b01548c3cdc561186870a1c807f227f0b /app/models/note_diff_file.rb | |
parent | d2798d607e11e0ebae83ae909404834388733428 (diff) | |
download | gitlab-ce-84727c8209a4412e21111a07f99b0438b03232de.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/note_diff_file.rb')
-rw-r--r-- | app/models/note_diff_file.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/note_diff_file.rb b/app/models/note_diff_file.rb index fcc9e2b3fd8..67a6d5d6d6b 100644 --- a/app/models/note_diff_file.rb +++ b/app/models/note_diff_file.rb @@ -3,15 +3,11 @@ class NoteDiffFile < ApplicationRecord include DiffFile - scope :for_commit_or_unresolved, -> do - joins(:diff_note).where("resolved_at IS NULL OR noteable_type = 'Commit'") - end - scope :referencing_sha, -> (oids, project_id:) do joins(:diff_note).where(notes: { project_id: project_id, commit_id: oids }) end - delegate :original_position, :project, to: :diff_note + delegate :original_position, :project, :resolved_at, to: :diff_note belongs_to :diff_note, inverse_of: :note_diff_file |