You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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"
The text was updated successfully, but these errors were encountered:
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:
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.
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:
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"
The text was updated successfully, but these errors were encountered: