aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Kinsella <jack@hermestechnologies.ie>2011-07-22 06:56:46 -0700
committerJack Kinsella <jack@hermestechnologies.ie>2011-07-22 06:56:46 -0700
commit216959f3b4b5fea363bc66eb4f5e7d7b77976328 (patch)
tree56c851da6ae947e67d7052c2e949abe0a6ccba1b
parentd8a2fe3eec07192ebc03600d6123720338d26ea2 (diff)
downloadrefinerycms-blog-216959f3b4b5fea363bc66eb4f5e7d7b77976328.tar.gz
refinerycms-blog-216959f3b4b5fea363bc66eb4f5e7d7b77976328.tar.bz2
refinerycms-blog-216959f3b4b5fea363bc66eb4f5e7d7b77976328.zip
Blog:PostsController#index doesn't paginate the blog posts if an rss feed is requested.
-rw-r--r--app/controllers/blog/posts_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/blog/posts_controller.rb b/app/controllers/blog/posts_controller.rb
index 9dc595c..edac5ab 100644
--- a/app/controllers/blog/posts_controller.rb
+++ b/app/controllers/blog/posts_controller.rb
@@ -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