Commit 712a2ec4fd7f2d6fb27bdb029ddac7e357558f63

Authored by Dmitriy Zaporozhets
1 parent 757e92d5

Case-insensetive search autocomplete for projets

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/project.rb
... ... @@ -139,7 +139,7 @@ class Project &lt; ActiveRecord::Base
139 139 end
140 140  
141 141 def search_by_title query
142   - where("projects.archived = ?", false).where("projects.name LIKE :query", query: "%#{query}%")
  142 + where("projects.archived = ?", false).where("LOWER(projects.name) LIKE :query", query: "%#{query.downcase}%")
143 143 end
144 144  
145 145 def find_with_namespace(id)
... ...