diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-29 18:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-29 18:09:30 +0300 |
commit | 09ff71d425b83646eed07d52078111ccbd4b84a9 (patch) | |
tree | 836e655ab4bd9fc680a35ab9e4a176134a2c9221 /app/models/note.rb | |
parent | 1838e244070041ed8ebb6344c628b580d78b578f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/note.rb')
-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 c75d6aa77e6..69b1d6f6fc3 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -135,6 +135,7 @@ class Note < ApplicationRecord project: [:project_members, :namespace, { group: [:group_members] }]) end scope :with_metadata, -> { includes(:system_note_metadata) } + scope :with_web_entity_associations, -> { preload(:project, :author, :noteable) } scope :for_note_or_capitalized_note, ->(text) { where(note: [text, text.capitalize]) } scope :like_note_or_capitalized_note, ->(text) { where('(note LIKE ? OR note LIKE ?)', text, text.capitalize) } |