bootstrap-ruby / will_paginate-bootstrap

Integrates the Twitter Bootstrap pagination component with will_paginate
MIT License
388 stars 160 forks source link

Limiting number of pages in links using will_paginate #47

Open poombavai opened 8 years ago

poombavai commented 8 years ago

Hi.. I am using the following gems

gem 'will_paginate', '~> 3.0.6' gem 'will_paginate-bootstrap'

:inner_window and outer_window properties doesnot showing me any changes in my page.. I have tried like,

my views,

<%= will_paginate @issue, page_links: true, inner_window: 2, outer_window: 1 %>

my controller,

@issue = Issue.all.paginate(page: params[:page], per_page: 5).order("issue_slip_no DESC") .. How should I correct it?

diegocasmo commented 8 years ago

This did it for me (using haml):

= will_paginate @articles, renderer: BootstrapPagination::Rails, inner_window: 1, outer_window: 1