You have several options:
Option 1: the monkey patch WillPaginate::ActionView::LinkRenderer#url
, which currently has the following URL logic:
def url(page) @base_url_params ||= begin url_params = merge_get_params(default_url_params) merge_optional_params(url_params) end url_params = @base_url_params.dup add_current_page_param(url_params, page) @template.url_for(url_params) end
So, I suppose you can do something like "/list/page/#{page}"
instead.
Another way is to fully implement the renderer (by subclassing WillPaginate::ViewHelpers::LinkRenderer
) and then providing it as :renderer => MyRendererClass
when calling will_paginate.
Roman source share