From 76e9fc7b29c1ce716c26932e9fbec0f3c99f53f4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 11 Mar 2020 18:09:23 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/models/snippet.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/snippet.rb') 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. -- cgit v1.2.3