1
votes

So i am using rails and want to proceed with either will_paginate or kaminari for pagination. Here is my below requirement.

  • I have lets say 900 records and want to show 10 records per page. So in total i want to show 90 links in pagination like >. So just based on records count i want to perform this.

So my question is, Though i have overall 900 records, my end point only gives me 10 records at the start. But I want to show links for 900 records (10 records per page). Using pagination later i want to load dynamically whenever user has clicked random page.

1
So, what's the question?Kamiccolo
I think you got to look at this first github.com/amatsuda/kaminari#helpersOjash
@Ojash tell me what you gotRahul Dess
you could define the window to control how many pages link you want to add.Ojash

1 Answers

1
votes

I go with Ojash answer. you can use kaminari and specify the window.

<%= paginate @users, :outer_window => 3 %>