Paginate page_count is incorrect
Reported by crazygecko (at gmail) | June 1st, 2007 @ 07:38 PM
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
- → Assigned user changed from Chris Wanstrath to Mislav
- → State changed from new to open
-
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 Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
