Case-insensetive search autocomplete for projets

Signed-off-by: NDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册