OSDN Git Service

Fixed: 'search titles only' box ignored after one search is done on titles only.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 21 Jul 2008 19:19:06 +0000 (19:19 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 21 Jul 2008 19:19:06 +0000 (19:19 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1684 e93f8b46-1217-0410-a6f0-8f06a7374b81

vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb

index 9ec0e7d..9a81f36 100644 (file)
@@ -78,7 +78,7 @@ module Redmine
             end
             
             columns = searchable_options[:columns]
-            columns.slice!(1..-1) if options[:titles_only]
+            columns = columns[0..0] if options[:titles_only]
             
             token_clauses = columns.collect {|column| "(LOWER(#{column}) LIKE ?)"}