app/controllers/blog/posts_controller.rb in comfy_blog-0.1.0 vs app/controllers/blog/posts_controller.rb in comfy_blog-0.1.1

- old
+ new

@@ -14,10 +14,16 @@ Blog::Post.published end respond_to do |f| f.html do - @posts = scope.paginate :per_page => ComfyBlog.config.posts_per_page, :page => params[:page] + @posts = if defined? WillPaginate + scope.paginate :per_page => ComfyBlog.config.posts_per_page, :page => params[:page] + elsif defined? Kaminari + scope.page(params[:page]).per(ComfyBlog.config.posts_per_page) + else + scope + end end f.rss do @posts = scope.limit(ComfyBlog.config.posts_per_page) end end