gitlab-org--gitlab-foss/app/models/label_link.rb
Zeger-Jan van de Weg 47da013cf8 Annotate the models
2016-05-06 08:27:46 +02:00

19 lines
406 B
Ruby

# == Schema Information
#
# Table name: label_links
#
# id :integer not null, primary key
# label_id :integer
# target_id :integer
# target_type :string
# created_at :datetime
# updated_at :datetime
#
class LabelLink < ActiveRecord::Base
belongs_to :target, polymorphic: true
belongs_to :label
validates :target, presence: true
validates :label, presence: true
end