Sha256: 68ad318710510993672230e00709d05e4bca1891ad0655ad0fe90b0c11c1b571
Contents?: true
Size: 398 Bytes
Versions: 25
Compression:
Stored size: 398 Bytes
Contents
module Tenon class ItemAsset < ActiveRecord::Base # Validations validates_presence_of :asset validates_presence_of :item # 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
25 entries across 25 versions & 1 rubygems