diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
commit | 2d1866d966d94c688f9cb87c5bf3f096dffac844 (patch) | |
tree | 7a733c1cc51448ab69b3f892285305dbfb0ae15e /app/controllers/auto_completes_controller.rb | |
parent | a6ec78a4dc658e3517ed682792016b6530458696 (diff) | |
download | redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.tar.gz redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.zip |
Merged rails-4.1 branch (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/auto_completes_controller.rb')
-rw-r--r-- | app/controllers/auto_completes_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/auto_completes_controller.rb b/app/controllers/auto_completes_controller.rb index a48afdf90..991f0be16 100644 --- a/app/controllers/auto_completes_controller.rb +++ b/app/controllers/auto_completes_controller.rb @@ -26,7 +26,7 @@ class AutoCompletesController < ApplicationController if q.match(/\A#?(\d+)\z/) @issues << scope.find_by_id($1.to_i) end - @issues += scope.where("LOWER(#{Issue.table_name}.subject) LIKE LOWER(?)", "%#{q}%").order("#{Issue.table_name}.id DESC").limit(10).all + @issues += scope.where("LOWER(#{Issue.table_name}.subject) LIKE LOWER(?)", "%#{q}%").order("#{Issue.table_name}.id DESC").limit(10).to_a @issues.compact! end render :layout => false |