Skip to content


Href omitted unless trailing slash (or other condition) appears in request url #242

entrity opened this Issue · 2 comments

3 participants


I'm getting no href attribute at all when my URL path consists of only my controller name (a Rails default for 'index', which is the only place I need will_paginate).

If I include a trailing slash, an action name, or query data, then the links work, but otherwise, it's only <a>[text]</a>.

Looks like this fellow has the same problem:


I'm getting a similar problem in production, the pagination doesn't work unless there is a trailing slash i.e. /blog?page=2 doesn't work, but /blog/?page=2 works :(


Looks like a problem with Rails router, or maybe the way you've configured it in your application? will_paginate doesn't generate links by itself. It only passes some extra params to them.

If this problem persists please describe your Rails version, will_paginate version and paste the relevant portions of your routes file.

@mislav mislav closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.