diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-16 19:14:31 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-18 15:18:06 +0000 |
commit | d847db79cb6a99d9cfb6f4c57587887942965388 (patch) | |
tree | eab21bec8ff4667ea931e438e7d66a346e62659d /app/helpers/labels_helper.rb | |
parent | 645b7a0a3389dca3a709f65a52ae765f213078f2 (diff) | |
download | gitlab-ce-d847db79cb6a99d9cfb6f4c57587887942965388.tar.gz |
Fixes issue on dashboard issues
They would try to load JSON from a project even though it isn't a single project
Diffstat (limited to 'app/helpers/labels_helper.rb')
-rw-r--r-- | app/helpers/labels_helper.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index 4455dcd0e20..361811163f9 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -116,12 +116,14 @@ module LabelsHelper else Label.where(project_id: @projects) end + end - grouped_labels = GlobalLabel.build_collection(labels) - grouped_labels.unshift(Label::None) - grouped_labels.unshift(Label::Any) - - options_from_collection_for_select(grouped_labels, 'name', 'title', params[:label_name]) + def labels_filter_path + if @project + namespace_project_labels_path(@project.namespace, @project, :json) + else + labels_dashboard_path(:json) + end end def label_subscription_status(label) |