gitlab-org--gitlab-foss/app/models/group_label.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
276 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-09-19 15:04:38 +00:00
class GroupLabel < Label
belongs_to :group
belongs_to :parent_container, foreign_key: :group_id, class_name: 'Group'
2016-09-19 15:04:38 +00:00
validates :group, presence: true
alias_attribute :subject, :group
def subject_foreign_key
'group_id'
end
2016-09-19 15:04:38 +00:00
end