aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorFernando Blat <ferblape@gmail.com>2010-10-05 17:36:49 +0200
committerFernando Blat <ferblape@gmail.com>2010-10-05 17:36:49 +0200
commit4a3f0724abac97804af43ebb432bd8cedd5813d7 (patch)
treef8ffa8adac1ebcab5dc7f780eb4b31dab41c3ed8 /app/controllers
parent8e783484211384fdcb1e6b24a76535f013aa4598 (diff)
downloadrefinerycms-blog-4a3f0724abac97804af43ebb432bd8cedd5813d7.tar.gz
refinerycms-blog-4a3f0724abac97804af43ebb432bd8cedd5813d7.tar.bz2
refinerycms-blog-4a3f0724abac97804af43ebb432bd8cedd5813d7.zip
Pagination
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/blog/posts_controller.rb6
1 files changed, 3 insertions, 3 deletions
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