app/controllers/blog/posts_controller.rb in comfy_blog-0.0.0 vs app/controllers/blog/posts_controller.rb in comfy_blog-0.1.0
- old
+ new
@@ -12,10 +12,17 @@
params[:month] ? scope.for_month(params[:month]) : scope
else
Blog::Post.published
end
- @posts = scope.paginate :per_page => ComfyBlog.config.posts_per_page, :page => params[:page]
+ respond_to do |f|
+ f.html do
+ @posts = scope.paginate :per_page => ComfyBlog.config.posts_per_page, :page => params[:page]
+ end
+ f.rss do
+ @posts = scope.limit(ComfyBlog.config.posts_per_page)
+ end
+ end
end
def show
@post = if params[:slug] && params[:year] && params[:month]
Blog::Post.published.find_by_year_and_year_and_slug!(params[:year], params[:month], params[:slug])