Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/projects/topic.rb')
-rw-r--r--app/models/projects/topic.rb4
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