Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-07 06:09:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-07 06:09:37 +0300
commit3e59f1f11a387ab3e0383f7beea8ea599291a293 (patch)
tree6fbbe3ba17b30e60e535d73912b99f794d746d01 /app
parent1e19d757e8a088e9d4aa67cc092fda87aba1cd35 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/models/note.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index ac2b54629ae..4b65103aa9f 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -141,6 +141,7 @@ class Note < ApplicationRecord
scope :with_discussion_ids, ->(discussion_ids) { where(discussion_id: discussion_ids) }
scope :with_suggestions, -> { joins(:suggestions) }
scope :inc_author, -> { includes(:author) }
+ scope :authored_by, ->(user) { where(author: user) }
scope :inc_note_diff_file, -> { includes(:note_diff_file) }
scope :with_api_entity_associations, -> { preload(:note_diff_file, :author) }
scope :inc_relations_for_view, ->(noteable = nil) do