2014-09-02 18:07:02 +05:30
|
|
|
class LabelLink < ActiveRecord::Base
|
2016-08-24 12:49:21 +05:30
|
|
|
include Importable
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
belongs_to :target, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
|
2014-09-02 18:07:02 +05:30
|
|
|
belongs_to :label
|
|
|
|
|
2016-08-24 12:49:21 +05:30
|
|
|
validates :target, presence: true, unless: :importing?
|
|
|
|
validates :label, presence: true, unless: :importing?
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|