diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-31 14:00:30 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-31 14:00:30 -0500 |
commit | 78207b95ca7795c82bfc14fdf35422714906b14d (patch) | |
tree | b4a39e3213a336dd56b2527a1e7af19cb4f75cf0 /app/models/note.rb | |
parent | 257f4eaa97d4ebed7feac36040a37650c25a6ca0 (diff) | |
download | gitlab-ce-78207b95ca7795c82bfc14fdf35422714906b14d.tar.gz |
Move includes call to scopedm-discussions-n-plus-1
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 60257aac93b..832c68243fb 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -110,7 +110,7 @@ class Note < ActiveRecord::Base end def discussions(context_noteable = nil) - Discussion.build_collection(fresh, context_noteable) + Discussion.build_collection(all.includes(:noteable).fresh, context_noteable) end def find_discussion(discussion_id) |