add x-total-pages header to post listing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user