2014-07-29 10:10:15 -04:00
|
|
|
class LabelLink < ActiveRecord::Base
|
2016-07-22 06:10:45 -04:00
|
|
|
include Importable
|
|
|
|
|
2017-06-02 08:29:30 -04:00
|
|
|
belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
|
2014-07-29 10:10:15 -04:00
|
|
|
belongs_to :label
|
|
|
|
|
2016-07-22 06:10:45 -04:00
|
|
|
validates :target, presence: true, unless: :importing?
|
|
|
|
validates :label, presence: true, unless: :importing?
|
2014-07-29 10:10:15 -04:00
|
|
|
end
|