aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/blog
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2011-06-13 20:23:40 -0700
committerJoe Sak <joe@joesak.com>2011-06-13 20:23:40 -0700
commitdb821498767c05b1cc4cafa268593eac575597a0 (patch)
tree177fb3ced78f088bcf1ab54135f5497bc28abe64 /app/controllers/blog
parentb91b381e8eb6e5dc572ea4e53b138caba1a011fa (diff)
parenta31f28126a0099fbf3f4f694c52b109e73c92e08 (diff)
downloadrefinerycms-blog-db821498767c05b1cc4cafa268593eac575597a0.tar.gz
refinerycms-blog-db821498767c05b1cc4cafa268593eac575597a0.tar.bz2
refinerycms-blog-db821498767c05b1cc4cafa268593eac575597a0.zip
Merge pull request #74 from wikyd/master
Add Paging to Category Show View
Diffstat (limited to 'app/controllers/blog')
-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