-
Notifications
You must be signed in to change notification settings - Fork 137
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
Include total pages in header #68
Comments
@dan-klasson You should be able to get this from the
You can grab that "last" link and parse the page number out of it. |
@davidcelis Getting the page number from parsing a string isn't very convenient. Why not just add the total pages number to the header as well? |
I'm hesitant to add another header, as it's starting to feel heavy-handed; we've already got |
@davidcelis Your gem is called |
I'm aware. Also, opening with this made me want to immediately re-close this issue with very little further comment. I hope you'll take a step back from how you're starting to address me and think about how it would feel in my shoes.
Adding a header that doesn't provide new information isn't intrinsic to my "business domain". I prefer the software I write to do the minimum amount of work required of most use cases. So far, in the years that I've maintained this gem, you're the only person who has requested this header. Finally, in the web world, people really care about the size of HTTP requests. I know an addition header like
You're always free to re-open any of this gem's classes in your own app to add the header! But I'm not a huge fan of adding functionality for a single person, especially if it's something that I'm not sure is particularly necessary. As I said before, I'll leave this open so that it's more discoverable for others who might also want this, but until they show up… I'd recommend having your own patch. |
I didn't mean to offend you. I merely tried to point out that your gem is awesome but it's missing something simple as a few extra bytes in the header.
Just because someone hasn't had the need for it before, doesn't make it not necessary. Total rows and total pages are the most important details in pagination. Much more important than link headers IMHO. |
Having a Total Pages header parameter makes sense to me, since links doesn't at all. +1 |
The header has Per-Page and Total. But no Total Pages.
The text was updated successfully, but these errors were encountered: