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:
authorDouwe Maan <douwe@selenight.nl>2017-04-01 00:52:38 +0300
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 19:44:14 +0300
commitafa53810deab37c95da245510a7cf85e8846a162 (patch)
tree1e6a4e64584e64fabb8e7ea21a7e9e13624ea018 /app/finders/notes_finder.rb
parent21e10888c3fc0fe545c0443cf0e23f593df847a4 (diff)
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))