summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-12 16:06:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-12 16:06:43 +0000
commit29e0bca43a6df01fe14b92ac2214eaf02b06ee62 (patch)
treedfd1e82d2e4178669129e832722f2501f36aebd1 /app/controllers
parenta8b12bcb520230b9cc25abd2d7346d746c49874d (diff)
downloadredmine-29e0bca43a6df01fe14b92ac2214eaf02b06ee62.tar.gz
redmine-29e0bca43a6df01fe14b92ac2214eaf02b06ee62.zip
Make sure there's no nil result in auto_complete.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4503 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/auto_completes_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/auto_completes_controller.rb b/app/controllers/auto_completes_controller.rb
index a3ed88e36..feb1cb231 100644
--- a/app/controllers/auto_completes_controller.rb
+++ b/app/controllers/auto_completes_controller.rb
@@ -11,6 +11,7 @@ class AutoCompletesController < ApplicationController
unless q.blank?
@issues += query.visible.find(:all, :conditions => ["LOWER(#{Issue.table_name}.subject) LIKE ?", "%#{q.downcase}%"], :limit => 10)
end
+ @issues.compact!
render :layout => false
end