diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-01-09 10:27:57 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-01-09 10:27:57 +0000 |
commit | c587009b42b7009cd04657ad33df514b38237ae5 (patch) | |
tree | 867dbfee4227c9d4d5db6b0305a7450d9c470bd5 /lib | |
parent | cf60b287890534fd5daf54639ace20c066b13d2a (diff) |
Make sure paging authority list works even when using typeahead search
Diffstat (limited to 'lib')
-rw-r--r-- | lib/willpaginate_extension.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/willpaginate_extension.rb b/lib/willpaginate_extension.rb index 912748957..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 |