Permalink
Browse files

N+1 bug fix for Nodes query.:

  • Loading branch information...
1 parent c3564a5 commit 57d5a40861b3ca14195aa750126a278f95f26c9f @huacnlee huacnlee committed Apr 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/cells/topics_cell.rb
View
@@ -8,7 +8,7 @@ class TopicsCell < BaseCell
"index_sections:#{CacheVersion.section_node_updated_at}"
end
def index_sections
- @sections = Section.all
+ @sections = Section.all.includes(:nodes)
render
end

0 comments on commit 57d5a40

Please sign in to comment.