From 4a3f0724abac97804af43ebb432bd8cedd5813d7 Mon Sep 17 00:00:00 2001 From: Fernando Blat Date: Tue, 5 Oct 2010 17:36:49 +0200 Subject: Pagination --- app/controllers/blog/posts_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/controllers/blog/posts_controller.rb b/app/controllers/blog/posts_controller.rb index a0340b7..57e45fb 100644 --- a/app/controllers/blog/posts_controller.rb +++ b/app/controllers/blog/posts_controller.rb @@ -2,14 +2,14 @@ class Blog::PostsController < BlogController before_filter :find_all_blog_posts before_filter :find_blog_post, :only => [:show, :comment] - + def index respond_to do |format| format.html format.rss end end - + def show @blog_comment = BlogComment.new present(@page) @@ -37,7 +37,7 @@ protected end def find_all_blog_posts - @blog_posts = BlogPost.live + @blog_posts = BlogPost.live :page => params[:page], :per_page => RefinerySetting.find_or_set(:posts_per_page, 10) end end -- cgit v1.2.3