diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-11-24 11:45:19 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-11-24 17:28:50 +0100 |
commit | aedd2cfa5b82c01f82ec26b64880fce2a07fe942 (patch) | |
tree | e8c2094d81b86a471fdbb9de4f4a279ec0a0ef75 /app/finders/notes_finder.rb | |
parent | b355ebc4c9b38320366d7640ecf51da23fbb7ea1 (diff) | |
download | gitlab-ce-aedd2cfa5b82c01f82ec26b64880fce2a07fe942.tar.gz |
Use Gitlab::SQL::Pattern where appropriate
Diffstat (limited to 'app/finders/notes_finder.rb')
-rw-r--r-- | app/finders/notes_finder.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb index 02eb983bf55..12157818bcd 100644 --- a/app/finders/notes_finder.rb +++ b/app/finders/notes_finder.rb @@ -104,8 +104,7 @@ class NotesFinder query = @params[:search] return notes unless query - pattern = "%#{query}%" - notes.where(Note.arel_table[:note].matches(pattern)) + notes.search(query) end # Notes changed since last fetch |