Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no headers created? #53

Closed
MarieS1415 opened this issue Jun 20, 2018 · 2 comments
Closed

no headers created? #53

MarieS1415 opened this issue Jun 20, 2018 · 2 comments

Comments

@MarieS1415
Copy link

I am trying to switch from will_paginate to pagy, but pagy does not seem to add headers to the response to a request.
With will_paginate, I have:
image

Is there any equivalent with pagy to get that information?

I added include Pagy::Backend to my ApplicationController, and I am using ruby 2.3.0. The views are kept really simple, for example for my model "content", it looks like:
"json.array!(@contents) do |content|
json.extract! content, :id, :uid, :created_at, :updated_at, :name, :content_url, :format
end"

@ddnexus
Copy link
Owner

ddnexus commented Jun 20, 2018

Hi Marie,
Pagy doesn't currently add any header, however there are 2 gems that support Pagy and are specific for API pagination that you might find useful:

Besides that, we are always available to discuss any useful addition to Pagy. What would you like to have specifically from Pagy?

@MarieS1415
Copy link
Author

I would have liked to have information about how many pages there are, and the number of elements in the collection. Api-pagination works perfectly for that indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants