aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorKyle Wilkinson <kai@wikyd.org>2011-06-13 18:06:26 -0700
committerKyle Wilkinson <kai@wikyd.org>2011-06-13 18:06:26 -0700
commit9310b4176047dc24fce5841237441882ffee2e2f (patch)
tree14307099094f7853b268517ad1198e6c963a0f87 /app/controllers
parentb91b381e8eb6e5dc572ea4e53b138caba1a011fa (diff)
downloadrefinerycms-blog-9310b4176047dc24fce5841237441882ffee2e2f.tar.gz
refinerycms-blog-9310b4176047dc24fce5841237441882ffee2e2f.tar.bz2
refinerycms-blog-9310b4176047dc24fce5841237441882ffee2e2f.zip
Modify the category view of the blog to show a paged view, rather than all blog posts.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/blog/categories_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/blog/categories_controller.rb b/app/controllers/blog/categories_controller.rb
index 4795e99..35a87c3 100644
--- a/app/controllers/blog/categories_controller.rb
+++ b/app/controllers/blog/categories_controller.rb
@@ -2,6 +2,10 @@ class Blog::CategoriesController < BlogController
def show
@category = BlogCategory.find(params[:id])
+ @blog_posts = @category.posts.live.includes(:comments, :categories).paginate({
+ :page => params[:page],
+ :per_page => RefinerySetting.find_or_set(:blog_posts_per_page, 10)
+ })
end
end