From 8c02d2f48da5ba13764c7f593d43100c8927f454 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 8 Mar 2013 16:48:56 -0500 Subject: [PATCH] Robin sucks at merging! This fixes a n+1 query. --- app/models/category.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/category.rb b/app/models/category.rb index 931f09e82e4..88ede172dd3 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -34,7 +34,7 @@ class Category < ActiveRecord::Base end def topic_url - topic.try(:relative_url) + topic_only_relative_url.try(:relative_url) end def ensure_slug