diff options
author | Marcel Amirault <mamirault@gitlab.com> | 2019-07-10 05:56:23 +0000 |
---|---|---|
committer | Marcel Amirault <mamirault@gitlab.com> | 2019-07-10 05:56:23 +0000 |
commit | 2b03a0c2cf699074ec37a863e5c752a2cab2b133 (patch) | |
tree | 7ebc289d2ec498fcebf8ae454cdb1eb1ef500dbd /app/models/note.rb | |
parent | c0deda7a86796c5de6ebe376c83f55af0965bde3 (diff) | |
parent | 810df4fb51bf3db4016c5f7458599331d4586300 (diff) | |
download | gitlab-ce-docs-hard-tabs.tar.gz |
Merge branch 'master' into 'docs-hard-tabs'docs-hard-tabs
# Conflicts:
# doc/administration/pseudonymizer.md
# doc/administration/uploads.md
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 4e9ea146485..5c31cff9816 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -158,6 +158,8 @@ class Note < ApplicationRecord Discussion.build_collection(all.includes(:noteable).fresh, context_noteable) end + # Note: Where possible consider using Discussion#lazy_find to return + # Discussions in order to benefit from having records batch loaded. def find_discussion(discussion_id) notes = where(discussion_id: discussion_id).fresh.to_a |