Read about our upcoming Code of Conduct on this issue

Commit 1e9e3fc7 authored by Hannes Rosenögger's avatar Hannes Rosenögger
Browse files

Make the project search case insensitive

parent d8a292254126
......@@ -2,7 +2,7 @@ Note: The upcoming release contains empty lines to reduce the number of merge co
v 7.8.0
- Replace highlight.js with rouge-fork rugments (Stefan Tatschner)
- Make project search case insensitive (Hannes Rosenögger)
......@@ -183,7 +183,7 @@ def active
def search(query)
joins(:namespace).where("projects.archived = ?", false).where(" LIKE :query OR projects.path LIKE :query OR LIKE :query OR projects.description LIKE :query", query: "%#{query}%")
joins(:namespace).where("projects.archived = ?", false).where("LOWER( LIKE :query OR LOWER(projects.path) LIKE :query OR LOWER( LIKE :query OR LOWER(projects.description) LIKE :query", query: "%#{query.downcase}%")
def search_by_title(query)
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