Browse files

add :ignore_params option to the action_view LinkRenderer

the will_paginate view helper copies query parameters from the request
onto the page links.   This is virtually always the right thing to do
for standard requests, but when the links are inside an HTML fragment
generated via AJAX, those links often contain extra params that
shouldn't be mirrored into the link.
  • Loading branch information...
1 parent 71f793e commit b74cd705a490cd4b085a4fc523d35c165d5dbbdc @bryanlarsen committed Mar 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/will_paginate/view_helpers/action_view.rb
@@ -117,7 +117,7 @@ def url(page)
def merge_get_params(url_params)
if @template.respond_to? :request and @template.request and @template.request.get?
- symbolized_update(url_params, @template.params)
+ symbolized_update(url_params, @template.params.except(*@options[:ignore_params]))

0 comments on commit b74cd70

Please sign in to comment.