Commit 712a2ec4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Case-insensetive search autocomplete for projets

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 757e92d5
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment