debian-mirror-gitlab/app/models/label_link.rb
2017-09-10 17:25:29 +05:30

9 lines
283 B
Ruby

class LabelLink < ActiveRecord::Base
include Importable
belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
belongs_to :label
validates :target, presence: true, unless: :importing?
validates :label, presence: true, unless: :importing?
end