diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-14 13:33:39 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-14 13:33:39 +0300 |
commit | 3a69dd20a1d8e54c25f871f35f09a1b8b5d4b2a4 (patch) | |
tree | 8240d16965886c2a462fe969664de4e7d22b96e9 /app/models | |
parent | 03b7fe71a5c5372fc8239a26e757685ab12eed87 (diff) |
Allow dashboard and group issues/MRs to be filtered by label
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/group_label.rb | 9 | ||||
-rw-r--r-- | app/models/group_milestone.rb | 12 |
2 files changed, 11 insertions, 10 deletions
diff --git a/app/models/group_label.rb b/app/models/group_label.rb new file mode 100644 index 00000000000..0fc39cb8771 --- /dev/null +++ b/app/models/group_label.rb @@ -0,0 +1,9 @@ +class GroupLabel + attr_accessor :title, :labels + alias_attribute :name, :title + + def initialize(title, labels) + @title = title + @labels = labels + end +end diff --git a/app/models/group_milestone.rb b/app/models/group_milestone.rb index 1dd2be68ebf..91844da62e2 100644 --- a/app/models/group_milestone.rb +++ b/app/models/group_milestone.rb @@ -1,5 +1,5 @@ class GroupMilestone - + attr_accessor :title, :milestones alias_attribute :name, :title def initialize(title, milestones) @@ -7,18 +7,10 @@ class GroupMilestone @milestones = milestones end - def title - @title - end - def safe_title @title.parameterize end - - def milestones - @milestones - end - + def projects milestones.map { |milestone| milestone.project } end |