summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-04-20 10:56:28 +0200
committerJames Lopez <james@jameslopez.es>2016-04-20 10:56:28 +0200
commitaf18cddddf4ecb402ac613ddcc1f313f6adb7aad (patch)
tree02395653f7c79013b3c894e776c158f2bfeba672 /app/finders
parent8619208b644f2acdc30ccf36209ac56527bb4188 (diff)
downloadgitlab-ce-af18cddddf4ecb402ac613ddcc1f313f6adb7aad.tar.gz
udpated a few things based on MR feedback. Also added model spec
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/issuable_finder.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index f8e2062d110..ca71acb65d3 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -270,8 +270,7 @@ class IssuableFinder
if filter_by_no_label?
items = items.without_label
else
- items = items.with_label(label_names.flatten)
-
+ items = items.with_label(label_names)
if projects
items = items.where(labels: { project_id: projects })
end
@@ -282,7 +281,7 @@ class IssuableFinder
end
def label_names
- params[:label_name].split(',')
+ params[:label_name].is_a?(String) ? params[:label_name].split(',') : params[:label_name]
end
def current_user_related?