summaryrefslogtreecommitdiff
path: root/app/models/global_milestone.rb
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/models/global_milestone.rb
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/models/global_milestone.rb')
-rw-r--r--app/models/global_milestone.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/global_milestone.rb b/app/models/global_milestone.rb
index fd17745b035..59f5a7703e2 100644
--- a/app/models/global_milestone.rb
+++ b/app/models/global_milestone.rb
@@ -8,7 +8,9 @@ class GlobalMilestone
attr_reader :milestone
alias_attribute :name, :title
- delegate :title, :state, :due_date, :start_date, :participants, :project, :group, :expires_at, :closed?, :iid, :group_milestone?, :safe_title, :milestoneish_id, to: :milestone
+ delegate :title, :state, :due_date, :start_date, :participants, :project,
+ :group, :expires_at, :closed?, :iid, :group_milestone?, :safe_title,
+ :milestoneish_id, :parent, to: :milestone
def to_hash
{