summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2019-04-23 19:58:20 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-23 19:58:20 +0000
commit8ce4b6093a2e64f21928dded6c58950f180d8c2a (patch)
treee3478cf58d2119fd2f84572d34acf0c507e75a5b /app/controllers
parentbe15592a1c1551bb6136081ea995dca49e238c8f (diff)
downloadgitlab-ce-8ce4b6093a2e64f21928dded6c58950f180d8c2a.tar.gz
Move scoped_label into label presenter
When rendering a label we want to check 'scoped_label' feature availability on a project/group where label is being used. For this reason a label presenter is used in UI and information about context project/group is passed to this presenter.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/milestone_actions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/concerns/milestone_actions.rb b/app/controllers/concerns/milestone_actions.rb
index c0c0160a827..cfff154c3dd 100644
--- a/app/controllers/concerns/milestone_actions.rb
+++ b/app/controllers/concerns/milestone_actions.rb
@@ -31,7 +31,7 @@ module MilestoneActions
format.html { redirect_to milestone_redirect_path }
format.json do
render json: tabs_json("shared/milestones/_labels_tab", {
- labels: @milestone.labels # rubocop:disable Gitlab/ModuleWithInstanceVariables
+ labels: @milestone.labels.map { |label| label.present(issuable_subject: @milestone.parent) } # rubocop:disable Gitlab/ModuleWithInstanceVariables
})
end
end