Blog:PostsController#index doesn't paginate the blog posts if an rss feed is requested.
This commit is contained in:
parent
d8a2fe3eec
commit
216959f3b4
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue