will_paginate isn't a very efficient gem anyway, but I just noticed that what
with one thing and another, our app is including an id field from a nested
route that is blank, and then will_paginate tries to use this when generating
the route, so you wind up with a jacked-up route that has a blank where an id
ought to be and it all goes horribly wrong.
To be clear, I have a url like:
/postings?category_id=&…
and my routes look like:
resources :postings do
resources :categories
It appears that will_paginate just naively merges params into the mix when
generating its urls, and the router happily drops in a blank id so it thinks I
want the nested route and my pagination urls are coming out like
/categories//postings?category_id=&page=2
Am I missing something here, or have I indeed found a bug?
--
--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
---
You received this message because you are subscribed to the Google Groups "SD
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.