From af3c6ab72b1730735e353b0c3b9a1e6383bbb73f Mon Sep 17 00:00:00 2001 From: Matt Brewer Date: Sat, 16 Feb 2013 20:37:11 -0500 Subject: [PATCH] All tickets listing had PostgreSQL problem with missing includes --- app/admin/tickets.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/tickets.rb b/app/admin/tickets.rb index 8bb253e..2de4ed6 100644 --- a/app/admin/tickets.rb +++ b/app/admin/tickets.rb @@ -269,7 +269,7 @@ def find_ticket end def scoped_collection chain = end_of_association_chain.accessible_by(current_ability) - chain = chain.where(projects: { completed: false }) if @project.nil? + chain = chain.includes(:project).where(projects: { completed: false }) if @project.nil? chain end def new