hash parameters not properly kept in pagination links
Reported by Mislav | July 16th, 2007 @ 01:46 AM
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.
Comments and changes to this ticket
-
Mislav July 16th, 2007 @ 01:46 AM
- 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.
-
dies-el October 5th, 2007 @ 11:54 AM
- no changes were found...
-
dies-el October 16th, 2007 @ 10:34 PM
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
-
dies-el October 16th, 2007 @ 10:34 PM
Previous post is not spam fyi ;)
Andrew
ps. if this gets marked as spam I'll give up!
-
Mislav October 16th, 2007 @ 03:26 PM
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)
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 ยป
Everyone's favorite Ruby library for pagination of practically anything!
People watching this ticket
Attachments
Tags
Referenced by
- 56 will_paginate multiple collections (from [300]) WillPaginate: add :param_name option to ena...