diff options
author | Seb Bacon <seb@mysociety.org> | 2012-01-09 12:12:06 +0000 |
---|---|---|
committer | Seb Bacon <seb@mysociety.org> | 2012-01-09 12:12:06 +0000 |
commit | 2361c2d1ac2ab61248c02c4447dc273e299e2532 (patch) | |
tree | 535e152ae7f08e2e5ba8a92be6acaa61a5d064fe | |
parent | 22c2a8ce8c363e53e593128ec2e3f26aa8f259f1 (diff) | |
parent | f8377f248c15e6e48afe564ffc020f4dab34f998 (diff) |
Merge branch 'release/0.5' of https://github.com/sebbacon/alaveteli into wdtk
-rw-r--r-- | lib/willpaginate_extension.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/willpaginate_extension.rb b/lib/willpaginate_extension.rb index 4588b5256..3cdb0ae60 100644 --- a/lib/willpaginate_extension.rb +++ b/lib/willpaginate_extension.rb @@ -20,8 +20,7 @@ module WillPaginateExtension def url_for(page) page_one = page == 1 unless @url_string and !page_one - # the following line makes pagination work on our specially munged search page - @url_params = @template.request.symbolized_path_parameters + @url_params = {} # page links should preserve GET parameters stringified_merge @url_params, @template.params if @template.request.get? stringified_merge @url_params, @options[:params] if @options[:params] @@ -32,6 +31,9 @@ module WillPaginateExtension else @url_params[param_name] = page_one ? 1 : 2 end + # the following line makes pagination work on our specially munged search page + combined = @template.request.path_parameters["combined"] + @url_params["combined"] = combined if !combined.nil? url = @template.url_for(@url_params) return url if page_one |