Sha256: 180f5c0b483509221c0fc54ee519bb07e582350ed9295c96d781e2c088f57572
Contents?: true
Size: 372 Bytes
Versions: 10
Compression:
Stored size: 372 Bytes
Contents
module Tenon class ItemAsset < Tenon::ApplicationRecord # Validations validates_presence_of :asset # Relationships belongs_to :asset belongs_to :item, polymorphic: true accepts_nested_attributes_for :asset after_save :reprocess_asset def reprocess_asset asset.reload.attachment.reprocess! if asset_id_changed? end end end
Version data entries
10 entries across 10 versions & 1 rubygems