summaryrefslogtreecommitdiff
path: root/app/finders/notes_finder.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-11-24 11:45:19 +0100
committerDouwe Maan <douwe@selenight.nl>2017-11-24 17:28:50 +0100
commitaedd2cfa5b82c01f82ec26b64880fce2a07fe942 (patch)
treee8c2094d81b86a471fdbb9de4f4a279ec0a0ef75 /app/finders/notes_finder.rb
parentb355ebc4c9b38320366d7640ecf51da23fbb7ea1 (diff)
downloadgitlab-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.rb3
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