diff options
author | James Lopez <james@jameslopez.es> | 2016-04-20 10:56:28 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-04-20 10:56:28 +0200 |
commit | af18cddddf4ecb402ac613ddcc1f313f6adb7aad (patch) | |
tree | 02395653f7c79013b3c894e776c158f2bfeba672 /app/finders | |
parent | 8619208b644f2acdc30ccf36209ac56527bb4188 (diff) | |
download | gitlab-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.rb | 5 |
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? |