diff options
author | elijah <elijah@riseup.net> | 2015-06-15 12:24:03 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-06-15 12:24:03 -0700 |
commit | 09c9e2002b6cda941a9d15edc63bd4f46914d98e (patch) | |
tree | 70c9328242f47bb153e523c136b8a3ab084ba8cf /app/controllers/auto_completes_controller.rb | |
parent | 7ffb825d6775449ec842f5b66b1eb4d8fbc37765 (diff) |
fixed autocomplete patch
Diffstat (limited to 'app/controllers/auto_completes_controller.rb')
-rw-r--r-- | app/controllers/auto_completes_controller.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/app/controllers/auto_completes_controller.rb b/app/controllers/auto_completes_controller.rb deleted file mode 100644 index cbecd77..0000000 --- a/app/controllers/auto_completes_controller.rb +++ /dev/null @@ -1,24 +0,0 @@ -# -# Override to change the LIMIT. -# Copied from Redmine 2.6 -# - -class AutoCompletesController < ApplicationController - def issues - @issues = [] - q = (params[:q] || params[:term]).to_s.strip - if q.present? - scope = Issue.cross_project_scope(@project, params[:scope]).visible - 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(100). - all - @issues.compact! - end - render :layout => false - end -end |