minor styling changes, kill n+1 query

This commit is contained in:
Sam
2013-10-18 11:23:08 +11:00
parent e82d975279
commit 6f32cb52d6
3 changed files with 9 additions and 3 deletions

View File

@ -53,7 +53,7 @@ class CategoryList
.order('COALESCE(categories.topics_year, 0) DESC')
if latest_post_only?
@categories = @categories.includes(:latest_post => :topic )
@categories = @categories.includes(:latest_post => {:topic => :last_poster} )
end
@categories = @categories.to_a