add x-total-pages header to post listing

This commit is contained in:
albert
2013-03-09 20:05:55 -05:00
parent 5d80e25e29
commit ca76d7de20

View File

@@ -9,6 +9,7 @@ class PostsController < ApplicationController
def index
@post_set = PostSets::Post.new(tag_query, params[:page], params[:limit])
@posts = @post_set.posts
response.headers["X-Total-Pages"] = @posts.total_pages.to_s
respond_with(@posts) do |format|
format.atom
end