diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-21 18:52:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-21 18:52:45 +0000 |
commit | dad5f6d403dcf70e11065da199f05be49ca2bc48 (patch) | |
tree | d983760b79c23a45babe49fa701c2eddd9900e86 /vendor/plugins/acts_as_searchable | |
parent | c65ab7c0f2722cee919ee2d516bf75f8a85daa21 (diff) | |
download | redmine-dad5f6d403dcf70e11065da199f05be49ca2bc48.tar.gz redmine-dad5f6d403dcf70e11065da199f05be49ca2bc48.zip |
Fixed search with all words (broken in r994).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1092 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor/plugins/acts_as_searchable')
-rw-r--r-- | vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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])}')" |