diff options
Diffstat (limited to 'app/models/projects/topic.rb')
-rw-r--r-- | app/models/projects/topic.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/projects/topic.rb b/app/models/projects/topic.rb index b42b03f0618..9214a23e259 100644 --- a/app/models/projects/topic.rb +++ b/app/models/projects/topic.rb @@ -23,6 +23,10 @@ module Projects end class << self + def find_by_name_case_insensitive(name) + find_by('LOWER(name) = ?', name.downcase) + end + def search(query) fuzzy_search(query, [:name]) end |