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>2020-03-11 21:09:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 21:09:23 +0300
commit76e9fc7b29c1ce716c26932e9fbec0f3c99f53f4 (patch)
treeb5ca8e3a6b2cf93b67257b38ee71e2efee177700 /app/models/snippet.rb
parenta210c43e0aca0311cc1d3d381763b25979ec72dc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 5c2e03e4b9c..a24428dee50 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -307,7 +307,7 @@ class Snippet < ApplicationRecord
end
class << self
- # Searches for snippets with a matching title or file name.
+ # Searches for snippets with a matching title, description or file name.
#
# This method uses ILIKE on PostgreSQL and LIKE on MySQL.
#
@@ -315,7 +315,7 @@ class Snippet < ApplicationRecord
#
# Returns an ActiveRecord::Relation.
def search(query)
- fuzzy_search(query, [:title, :file_name])
+ fuzzy_search(query, [:title, :description, :file_name])
end
# Searches for snippets with matching content.