BigW Consortium Gitlab

label_link.rb 406 Bytes
Newer Older
Dmitriy Zaporozhets committed
1 2 3 4 5 6 7
# == Schema Information
#
# Table name: label_links
#
#  id          :integer          not null, primary key
#  label_id    :integer
#  target_id   :integer
8
#  target_type :string
Dmitriy Zaporozhets committed
9 10 11 12
#  created_at  :datetime
#  updated_at  :datetime
#

13 14 15 16 17 18 19
class LabelLink < ActiveRecord::Base
  belongs_to :target, polymorphic: true
  belongs_to :label

  validates :target, presence: true
  validates :label, presence: true
end