I'm using will_paginate
as standard, but it only shows the pagination controls (< 1 2 > etc) when there's more than one page to display. Normally, this would be what is wanted, but I want to see the pagination controls (for UI consistency and to get round an annoying CSS quirk in the system I'm working on) even when there's only 1 page to display (showing < 1 >).
Is this possible?
The default will_paginate helper returns nil
when there is only one page, so you could do something like this:
<%= will_paginate(@records) || your_single_page_state_html %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With