Topic: Trailing slash affects my view!

When I try to access /admin on my app, the gem will_paginate doesn't work, but when I try:
/admin/ (or) /admin?[query-data]
will_paginate works fine.

When it works incorrectly, it outputs a span with the following text (no hyperlinks):

« Previous 1 < rel="next">2 < >3 < >4 < >5 < >6 < >7 < >8 < >9 < >10 < >11 < class="next_page" rel="next">Next »

My routes.rb file instructs:

map.connect 'admin', :controller => "admin/articles", :action => 'index'

What's stranger, when I add an instruction above that line, pointing to the same controller and action but a different url, then will_paginate works just as it should.

E.g.
map.connect 'foo', :controller => "admin/articles", :action => 'index'
map.connect 'admin', :controller => "admin/articles", :action => 'index'

With the foregoing routing instructions, the '/admin' returns a working pagination; '/foo' does not.

I've tried this on environments with will_paginate version 2.3.16 and version 3.0.1.

Last edited by Ruin the Moment (2011-09-20 16:14:33)