aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSeb Bacon <seb@mysociety.org>2012-01-09 11:21:54 +0000
committerSeb Bacon <seb@mysociety.org>2012-01-09 11:21:54 +0000
commit57cc5eff8b5e3050e3d6a66f7167fc28af329163 (patch)
tree93e9a3749b124227fbf9e4ca393a23478513c4b9 /lib
parent0015ed840ab01905cb3b25f7595bae6136b25c77 (diff)
parent322fb0a831a3da55421ea7f131785989d064bdb2 (diff)
Merge branch 'release/0.5' into wdtk
Diffstat (limited to 'lib')
-rw-r--r--lib/willpaginate_extension.rb7
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}")