Rahul Dess
Rahul Dess

Reputation: 2587

Showing pagination links based on total number of records

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

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.

Upvotes: 1

Views: 321

Answers (1)

Pardeep Saini
Pardeep Saini

Reputation: 2102

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

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

Upvotes: 1

Related Questions