-
Notifications
You must be signed in to change notification settings - Fork 9
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
Pagination instead of Page.all #9
Comments
True. But the guide was not mentioned to create a real-life application. I trust pagination is a good thing to study on yourself to consolidate everything you learned. |
After two attempts to implement endless scrolling or pagination I learned that you should not have closed this issue so quickly! Joosy is actually buggy or at least incomplete because it does not support setting collection related meta data (number of total records available, number of total records of an actual query available. I got two implementations almost working: Using the jQuery Waypoints plug-in which can not set the total number of records and an integration of the DataTables plug-in which does not integration which Joosy model layer. |
For the infinite scroll you don't really require the total number of entities. However I see your point and it makes sense. At Rails there's no real convention about pagination serialization across different gems. Maybe we should introduce it ourselves and add this functionality to the Collections, not sure yet. Currently it can easily be achieved using |
If I want to show how many records are available to see, I can't ask the Joosy resource as length() returns the number of loaded models only, not the total number of records in the database. |
Why so complicated? The |
No actual application works w/o pagination.
The text was updated successfully, but these errors were encountered: