diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-07 06:09:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-07 06:09:37 +0300 |
commit | 3e59f1f11a387ab3e0383f7beea8ea599291a293 (patch) | |
tree | 6fbbe3ba17b30e60e535d73912b99f794d746d01 /app | |
parent | 1e19d757e8a088e9d4aa67cc092fda87aba1cd35 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/models/note.rb | 1 |
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 |