Case-insensetive search autocomplete for projets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
757e92d52e
commit
712a2ec4fd
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue