From b48df57d9243336d4b96e29c5587137eff3a3c67 Mon Sep 17 00:00:00 2001 From: David Cabo Date: Fri, 23 Sep 2011 02:50:41 +0200 Subject: Remove invalid collate argument for public body searches The existing bug wasn't catched by the tests, because it only fails when running in dev: otherwise all the classes are loaded before the search is done, and acts_as_xapian can find the provided 'request_collapse' argument, even if the PublicBody class doesn't define it, since all the init options end up together in acts_as_xapian. --- app/controllers/public_body_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/public_body_controller.rb') diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index e4f8753af..28c826145 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -187,7 +187,7 @@ class PublicBodyController < ApplicationController query = params[:q] + '*' query = query.split(' ').join(' OR ') # XXX: HACK for OR instead of default AND! - @xapian_requests = perform_search([PublicBody], query, 'relevant', 'request_collapse', 5) + @xapian_requests = perform_search([PublicBody], query, 'relevant', nil, 5) render :partial => "public_body/search_ahead" end -- cgit v1.2.3