diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-09-16 10:59:03 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-09-16 12:09:36 +0100 |
commit | a5f9e3d8d91ccded80af07f6336bca44b1c9a171 (patch) | |
tree | bc8a43742144c58c6931818722cfe31bde45cc2a /app/controllers/request_controller.rb | |
parent | 94eefd313e6b8d5b4ef2f677d5516e2a7ac8b9aa (diff) |
Make the result of a form submit on the first step of "make new request" behave the same as the find-as-you-type implementation. Fixes #181.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index b615cc834..a9394fe39 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -35,7 +35,12 @@ class RequestController < ApplicationController # do nothing - as "authenticated?" has done the redirect to signin page for us return end - + + if !params[:query].nil? + query = params[:query] + '*' + query = query.split(' ').join(' OR ') # XXX: HACK for OR instead of default AND! + @xapian_requests = perform_search([PublicBody], query, 'relevant', 'request_collapse', 5) + end medium_cache end |