aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile3
-rw-r--r--app/controllers/blog/posts_controller.rb6
2 files changed, 5 insertions, 4 deletions
diff --git a/Gemfile b/Gemfile
index 29958ed..869c117 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1 +1,2 @@
-gem 'filters_spam', '~> 0.3' \ No newline at end of file
+gem 'filters_spam', '~> 0.3'
+gem "will_paginate", "~> 3.0.pre2" \ No newline at end of file
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