aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2010-12-03 13:01:12 +0200
committerUģis Ozols <ugis.ozolss@gmail.com>2010-12-03 13:01:12 +0200
commitdeca138ec9054488233f100a22edd12acdeaaf58 (patch)
tree19eb3fb100b7717d0620144a486434c439e82081 /app
parent0dc56cc0173df7df09a8d7a8ad01373d3dc81cd2 (diff)
downloadrefinerycms-blog-deca138ec9054488233f100a22edd12acdeaaf58.tar.gz
refinerycms-blog-deca138ec9054488233f100a22edd12acdeaaf58.tar.bz2
refinerycms-blog-deca138ec9054488233f100a22edd12acdeaaf58.zip
Reduce db queries.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/blog/posts_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/blog/posts_controller.rb b/app/controllers/blog/posts_controller.rb
index f489039..f7b6f3c 100644
--- a/app/controllers/blog/posts_controller.rb
+++ b/app/controllers/blog/posts_controller.rb
@@ -67,7 +67,7 @@ protected
end
def find_all_blog_posts
- @blog_posts = BlogPost.live.paginate({
+ @blog_posts = BlogPost.live.includes(:comments, :categories).paginate({
:page => params[:page],
:per_page => RefinerySetting.find_or_set(:blog_posts_per_page, 10)
})