From 78207b95ca7795c82bfc14fdf35422714906b14d Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 31 May 2017 14:00:30 -0500 Subject: Move includes call to scope --- app/models/note.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/note.rb') 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) -- cgit v1.2.1