From 6e81dd6dad26b783449b70ef46b1f53077a32cf1 Mon Sep 17 00:00:00 2001 From: Toks Date: Mon, 13 May 2013 14:09:48 -0400 Subject: [PATCH] include total post count for xml (#590) --- app/controllers/posts_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 87df1473c..2c46e52d8 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -13,7 +13,9 @@ class PostsController < ApplicationController respond_with(@posts) do |format| format.atom format.xml do - render :xml => @posts.to_xml(:root => "posts") + render :xml => @posts.to_xml(:root => "posts") {|builder| + builder.tag!(:total_count, @posts.total_count) + } end end end