diff options
Diffstat (limited to 'app/controllers/refinery')
-rw-r--r-- | app/controllers/refinery/blog/posts_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb index 999b49a..dbb2af8 100644 --- a/app/controllers/refinery/blog/posts_controller.rb +++ b/app/controllers/refinery/blog/posts_controller.rb @@ -10,7 +10,11 @@ module Refinery def index # Rss feeders are greedy. Let's give them every blog post instead of paginating. - (@posts = Post.live.includes(:comments, :categories)) if request.format.rss? + if request.format.rss? + @posts = Post.live.includes(:comments, :categories) + #limit rss feed for services (like feedburner) who have max size + @posts = Post.recent(params["max_results"]) if params["max_results"].present? + end respond_with (@posts) do |format| format.html format.rss { render :layout => false } |