Paginate page_count is incorrect
Reported by crazygecko (at gmail) | June 14th, 2007 @ 07:30 AM
I have just tried will_paginate with my Rails app. Everything works fine except the number of page links at the bottom.
I managed to track this done to a faulty page_count inside collections. Couldn't figure out why it is wrong.
Controller:
[code]
@town = params[:town]
@groups = Group.paginate_by_city @town, :page => params[:page]
[/code]
The above gets all listings for a town.
View:
[code]
= will_paginate @groups
[/code]
In model:
[code]
cattr_reader :per_page
@@per_page = 6
[/code]
I'll do my best to find the bug, if I do, it will be the first time!
Any ideas?
Comments and changes to this ticket
-
PJ Hyett June 14th, 2007 @ 07:30 AM
- State changed from new to open
- Assigned user changed from Chris Wanstrath to Mislav
-
Chris Wanstrath June 14th, 2007 @ 07:30 AM
- State changed from open to hold
A failing test case would be super awesome. Our fixtures and tests are pretty nice, thanks to Mislav. Just set up something that fails, do a diff of it, and send us a pastie (http://pastie.caboo.se/). Thanks!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป