diff options
author | Nick Thomas <nick@gitlab.com> | 2017-07-07 13:54:49 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-07-07 14:35:16 +0100 |
commit | 6b4da27e97a39448d363d453dce81cce574af9b5 (patch) | |
tree | eabcc3e09241a0f4337ae8e1dd58afef77e58684 /app/controllers/dashboard | |
parent | de2d5ce685877249434ba412b5839910bc703882 (diff) | |
download | gitlab-ce-6b4da27e97a39448d363d453dce81cce574af9b5.tar.gz |
Fix dashboard labels dropdown
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r-- | app/controllers/dashboard/labels_controller.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/dashboard/labels_controller.rb b/app/controllers/dashboard/labels_controller.rb index dd1d46a68c7..9dcb3a0eb6d 100644 --- a/app/controllers/dashboard/labels_controller.rb +++ b/app/controllers/dashboard/labels_controller.rb @@ -1,9 +1,14 @@ class Dashboard::LabelsController < Dashboard::ApplicationController def index - labels = LabelsFinder.new(current_user).execute - respond_to do |format| format.json { render json: LabelSerializer.new.represent_appearance(labels) } end end + + def labels + finder_params = { project_ids: projects.select(:id) } + labels = LabelsFinder.new(current_user, finder_params).execute + + GlobalLabel.build_collection(labels) + end end |