diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-02-24 00:22:36 +0300 |
---|---|---|
committer | Rubén Dávila <rdavila84@gmail.com> | 2016-03-05 06:37:03 +0300 |
commit | ed4808555877c668366d98a5408937712ad10d52 (patch) | |
tree | 1a11a41356487d978b6e0ecdf2a84ef20221d192 /app/models/global_milestone.rb | |
parent | 834b5d49ecb486065e3ecbf8b36becb416eff366 (diff) |
Refactor Merge Requests tab into a custom partial
* Add Labels tab to Groups
* Add decorator for label so it's aware of Milestones.
Diffstat (limited to 'app/models/global_milestone.rb')
-rw-r--r-- | app/models/global_milestone.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/global_milestone.rb b/app/models/global_milestone.rb index 40193a6f050..e13aaf16732 100644 --- a/app/models/global_milestone.rb +++ b/app/models/global_milestone.rb @@ -87,6 +87,12 @@ class GlobalMilestone @participants ||= milestones.map(&:participants).flatten.compact.uniq end + def labels + @labels ||= milestones.map do |ms| + ms.labels.map { |label| LabelWithMilestone.new(label, ms) } + end.flatten.sort_by!(&:title) + end + def opened_issues issues.opened end |