diff options
author | Seb Bacon <seb@mysociety.org> | 2012-01-09 11:15:06 +0000 |
---|---|---|
committer | Seb Bacon <seb@mysociety.org> | 2012-01-09 11:15:06 +0000 |
commit | c8e10d0654e471c637c462ef80a0484c0a008343 (patch) | |
tree | bb804a0154751f441c6f786b06d2b43b5b3bc147 /lib | |
parent | daf39e2287067b0fde275f674a5503dde7349b06 (diff) | |
parent | c587009b42b7009cd04657ad33df514b38237ae5 (diff) |
Merge branch 'release/0.5' of https://github.com/sebbacon/alaveteli into release/0.5
Diffstat (limited to 'lib')
-rw-r--r-- | lib/willpaginate_extension.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/willpaginate_extension.rb b/lib/willpaginate_extension.rb index 98ca8d763..4588b5256 100644 --- a/lib/willpaginate_extension.rb +++ b/lib/willpaginate_extension.rb @@ -5,9 +5,13 @@ module WillPaginateExtension # Hack for admin pages, when proxied via https on mySociety servers, they # need a relative URL. url = url_for(page) - if url.match(/^\/admin.*(\?.*)/) + if url.match(/\/admin.*(\?.*)/) url = $1 end + # Hack around our type-ahead search magic + if url.match(/\/body\/search_ahead/) + url.sub!("/body/search_ahead", "/select_authority") + end @template.link_to text, url, attributes end @@ -21,7 +25,6 @@ module WillPaginateExtension # 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] - @request_method=:get, @symbolized_path_parameters={:locale=>"en", :action=>"search", :combined=>["school", "all"], :controller=>"general"} if complex = param_name.index(/[^\w-]/) page_param = parse_query_parameters("#{param_name}=#{page}") |