summaryrefslogtreecommitdiff
path: root/app/models/group_label.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-17 17:48:46 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:27 -0200
commit8379fbcd47930320bf4dd6a3ac41c6efd427a91a (patch)
treec7f2f16f69032ae1584837c203d003c6b756ba25 /app/models/group_label.rb
parentd3b76e832f0afc38e2d0ffdff540c708a74ac26c (diff)
downloadgitlab-ce-8379fbcd47930320bf4dd6a3ac41c6efd427a91a.tar.gz
Add subject to group and projects labels which return group/project
Diffstat (limited to 'app/models/group_label.rb')
-rw-r--r--app/models/group_label.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/group_label.rb b/app/models/group_label.rb
index a1d8d087726..a698b532d19 100644
--- a/app/models/group_label.rb
+++ b/app/models/group_label.rb
@@ -3,6 +3,8 @@ class GroupLabel < Label
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