Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Paginate page_count is incorrect

#28

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?

Reported by crazygecko (at gmail) · June 14th, 2007 @ 07:30 AM

State: resolved
Milestone: none
Assigned to: Mislav Mislav

Activity

  1. PJ Hyett
    PJ Hyett
    • State changed from new to open
    • Assigned user changed from Chris Wanstrath to Mislav

    June 14th, 2007 @ 07:30 AM

  2. Chris Wanstrath
    Chris Wanstrath
    • 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!

    June 14th, 2007 @ 07:30 AM

  3. crazygecko (at gmail)
    crazygecko (at gmail)

    Cool, will do.

    I'll get this done shortly.

    June 14th, 2007 @ 07:30 AM

  4. Mislav
    Mislav
    • State changed from hold to resolved

    Fixed in [258]

    June 14th, 2007 @ 07:30 AM

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.