From dad5f6d403dcf70e11065da199f05be49ca2bc48 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 21 Jan 2008 18:52:45 +0000 Subject: Fixed search with all words (broken in r994). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1092 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vendor') diff --git a/vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb b/vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb index 1dd88978c..dff76b913 100644 --- a/vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb +++ b/vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb @@ -85,7 +85,7 @@ module Redmine end end - sql = ([token_clauses.join(' OR ')] * tokens.size).join(options[:all_words] ? ' AND ' : ' OR ') + sql = (['(' + token_clauses.join(' OR ') + ')'] * tokens.size).join(options[:all_words] ? ' AND ' : ' OR ') if options[:offset] sql = "(#{sql}) AND (#{searchable_options[:date_column]} " + (options[:before] ? '<' : '>') + "'#{connection.quoted_date(options[:offset])}')" -- cgit v1.2.3