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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-08 12:08:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-08 12:08:18 +0300
commitae6b82598ff1a9844c132e53799c252225b2c4c1 (patch)
treeee9faae6518819de06fd6f1ded511251bf100ef6 /app/models/projects
parentf9e55cc3c9ec3258051c60562b011bef22075f2a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/projects')
-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