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.

hash parameters not properly kept in pagination links

#65

Akbar reports:

If he uses

<input id="search_key" name="search[key]" type="text" />

... the search key is not properly preserved in pagination links. This works for him because there is no nesting in parameters:

<input id="search_key" name="search" type="text" />

I should check out if a recursive merge is needed for params when generating pagination links in the view.

Reported by Mislav · July 16th, 2007 @ 01:46 AM

State: invalid
Milestone: none
Assigned to: Mislav Mislav

Activity

  1. Mislav
    Mislav
    • State changed from open to invalid

    Changeset [300] adds a test that should fail if this report was true, but passes. I think the bug was in user code.

    July 16th, 2007 @ 01:46 AM

  2. dies-el
  3. dies-el
    dies-el

    Hey,

    Please find attached my patch to help the will_paginate helper expand hashes correctly.

    Although this bug is more of a rails issue (according to the comments in test_will_paginate_preserves_parameters), it still caused me enough problems to write a quick fix.

    I haven't written a test for this patch as test_will_paginate_preserves_parameters pass covers it (I think!).

    Cheers

    October 16th, 2007 @ 10:34 PM

  4. dies-el
    dies-el

    Previous post is not spam fyi ;)

    Andrew

    ps. if this gets marked as spam I'll give up!

    October 16th, 2007 @ 10:34 PM

  5. Mislav
    Mislav

    Dies: sorry that Lighthouse thinks you're spam.

    I won't fix this issue because it belongs to Rails, not will_paginate. Concerned folks may update their apps to Rails 2.0 (I'm not sure if 1.2.5 fixes this)

    October 16th, 2007 @ 03:26 PM

  6. Chris Wanstrath
    Chris Wanstrath

    1.2.5 does fix this issue.

    October 18th, 2007 @ 06:28 PM

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.