2016-09-19 11:04:38 -04:00
|
|
|
class GroupLabel < Label
|
|
|
|
belongs_to :group
|
|
|
|
|
|
|
|
validates :group, presence: true
|
2016-09-28 23:21:47 -04:00
|
|
|
|
2016-10-17 15:48:46 -04:00
|
|
|
alias_attribute :subject, :group
|
|
|
|
|
2016-10-27 22:43:31 -04:00
|
|
|
def subject_foreign_key
|
|
|
|
'group_id'
|
|
|
|
end
|
|
|
|
|
2016-10-11 15:30:40 -04:00
|
|
|
def to_reference(source_project = nil, target_project = nil, format: :id)
|
2016-10-11 15:51:11 -04:00
|
|
|
super(source_project, target_project, format: format)
|
2016-09-28 23:21:47 -04:00
|
|
|
end
|
2016-09-19 11:04:38 -04:00
|
|
|
end
|