Welcome to mirror list, hosted at ThFree Co, Russian Federation.

group_label.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 68841ace2e6b62698c6f5d73e66eab45c360cb27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class GroupLabel < Label
  belongs_to :group

  validates :group, presence: true

  alias_attribute :subject, :group

  def subject_foreign_key
    'group_id'
  end

  def to_reference(source_project = nil, target_project = nil, format: :id)
    super(source_project, target_project, format: format)
  end
end