Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit e9f872e04b028a2e79179338ae659173d8c7b45d 1 parent 71f793e
@bryanlarsen authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/will_paginate/view_helpers/action_view.rb
View
2  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]))
end
url_params
end
Please sign in to comment.
Something went wrong with that request. Please try again.