summaryrefslogtreecommitdiff
path: root/app/models/group_label.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/group_label.rb')
-rw-r--r--app/models/group_label.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/group_label.rb b/app/models/group_label.rb
new file mode 100644
index 00000000000..a698b532d19
--- /dev/null
+++ b/app/models/group_label.rb
@@ -0,0 +1,11 @@
+class GroupLabel < Label
+ belongs_to :group
+
+ validates :group, presence: true
+
+ alias_attribute :subject, :group
+
+ def to_reference(source_project = nil, target_project = nil, format: :id)
+ super(source_project, target_project, format: format)
+ end
+end