summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-18 16:22:57 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-18 16:22:57 +0200
commit712a2ec4fd7f2d6fb27bdb029ddac7e357558f63 (patch)
treed6e8ca12ec1d5e10de3cb928eec685ebd47b59b1 /app/models/project.rb
parent757e92d52eadd0fea43a4998e89f309f196c4396 (diff)
downloadgitlab-ce-712a2ec4fd7f2d6fb27bdb029ddac7e357558f63.tar.gz
Case-insensetive search autocomplete for projets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 2a792f0bbd3..30faaf00fff 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -139,7 +139,7 @@ class Project < ActiveRecord::Base
end
def search_by_title query
- where("projects.archived = ?", false).where("projects.name LIKE :query", query: "%#{query}%")
+ where("projects.archived = ?", false).where("LOWER(projects.name) LIKE :query", query: "%#{query.downcase}%")
end
def find_with_namespace(id)