I want to make my current will_paginate that looks like this:
<-Previous 1 2 3 4 5 Next->
Look like this
<-Previous 1 2 Next->
How do I control the amount of pages that can be displayed between previous and next?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
inner_windowandouter_windowproperties can be used to manipulate how many page links you see on each page. You can pass them to thewill_paginatemethod on your view (if you only want to limit the number of links for one page).If you want to limit the number of pages shown throughout your application, the best approach is an initializer file (call it something like will_paginate.rb). You can set global configuration options like so: