debian-mirror-gitlab/app/models/group_label.rb
2022-11-25 23:54:43 +05:30

14 lines
276 B
Ruby

# frozen_string_literal: true
class GroupLabel < Label
belongs_to :group
belongs_to :parent_container, foreign_key: :group_id, class_name: 'Group'
validates :group, presence: true
alias_attribute :subject, :group
def subject_foreign_key
'group_id'
end
end