Blog:PostsController#index doesn't paginate the blog posts if an rss feed is requested.

This commit is contained in:
Jack Kinsella 2011-07-22 06:56:46 -07:00
parent d8a2fe3eec
commit 216959f3b4

View file

@ -8,6 +8,8 @@ module Blog
respond_to :html, :js, :rss
def index
# Rss feeders are greedy. Let's give them every blog post instead of paginating.
(@blog_posts = BlogPost.live.includes(:comments, :categories).all) if request.format.rss?
respond_with (@blog_posts) do |format|
format.html
format.rss