summaryrefslogtreecommitdiff
path: root/app/finders/notes_finder.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-31 15:52:38 -0600
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 17:44:14 +0100
commitafa53810deab37c95da245510a7cf85e8846a162 (patch)
tree1e6a4e64584e64fabb8e7ea21a7e9e13624ea018 /app/finders/notes_finder.rb
parent21e10888c3fc0fe545c0443cf0e23f593df847a4 (diff)
downloadgitlab-ce-afa53810deab37c95da245510a7cf85e8846a162.tar.gz
Fix specs
Diffstat (limited to 'app/finders/notes_finder.rb')
-rw-r--r--app/finders/notes_finder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb
index c20bfb20171..3c499184b41 100644
--- a/app/finders/notes_finder.rb
+++ b/app/finders/notes_finder.rb
@@ -98,9 +98,9 @@ class NotesFinder
#
# This method uses ILIKE on PostgreSQL and LIKE on MySQL.
#
- def search(query, notes)
+ def search(notes)
query = @params[:search]
- return unless query
+ return notes unless query
pattern = "%#{query}%"
notes.where(Note.arel_table[:note].matches(pattern))