Limiting number of pages in links using will_paginate

Hi.. This is my first post in this forum. Kindly forgive if my problem doesnot meet your standard..

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?

Hi.. This is my first post in this forum. Kindly forgive if my problem doesnot meet your standard..

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?

I think you may have the wrong method in your controller. It appears as though the method you should call there is named page() not paginate(). Did you copy and paste this from your code? Here's the documentation -- you should call page(params[:page]).per_page(10) (separate chained method) not paginate and the methods as attributes. API documentation · mislav/will_paginate Wiki · GitHub

Walter

Walter Davis wrote in post #1182304:

:inner_window and outer_window properties doesnot showing me any changes 5).order("issue_slip_no DESC") .. How should I correct it?

I think you may have the wrong method in your controller. It appears as though the method you should call there is named page() not paginate(). Did you copy and paste this from your code? Here's the documentation -- you should call page(params[:page]).per_page(10) (separate chained method) not paginate and the methods as attributes. API documentation · mislav/will_paginate Wiki · GitHub

Walter

Thanks a bunch Walter.. I have corrected it..