Why did mislav-will_paginate start adding so much garbage to urls between rails 2.3.2 and 2.3.5?
Posted
by user30997
on Stack Overflow
See other posts from Stack Overflow
or by user30997
Published on 2010-02-22T08:26:38Z
Indexed on
2010/03/08
14:51 UTC
Read the original article
Hit count: 377
I've used will_paginate in a number of projects now, but when I moved one of them to Rails 2.3.5, clicking on any of the pagination links (page number, next, prev, etc.,) went from getting nice URLs like this:
http://foo.com/user/1/date/2005_01_31/phone/555-6161
to this:
http://foo.com/?options[]=user&options[]=date&options[]=2005_01_31&options[]=phone&options[]=555-6161
I have a route that looks like this that is probably the source of the 'options' keyword:
map.connect '/browse/*options', :controller=>'assets', :action=>'browse'
It's enough of an annoyance that I'm willing to roll a paginator to get around this if there isn't a way to get back to where I was before. Is there a way to get will_paginate to turn array-style routes into sane urls again?
Thanks.
© Stack Overflow or respective owner