Sha256: 82fdf475a45643dc8204381020a45db6c5ae267b17aaf88c62b3030c68ac3bc6

Contents?: true

Size: 302 Bytes

Versions: 19

Compression:

Stored size: 302 Bytes

Contents

module Ksk::Preview
  extend ActiveSupport::Concern

  included do
    belongs_to :asset
    has_many :assets, :as => :fileable

    accepts_nested_attributes_for :assets, allow_destroy: true

    validates_presence_of :asset_id
  end


  def file_assets
    assets.only_data_files
  end
  
      
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ksk-0.4.11 app/models/concerns/ksk/preview.rb
ksk-0.4.10 app/models/concerns/ksk/preview.rb
ksk-0.4.9 app/models/concerns/ksk/preview.rb
ksk-0.4.8 app/models/concerns/ksk/preview.rb
ksk-0.4.7 app/models/concerns/ksk/preview.rb
ksk-0.4.6 app/models/concerns/ksk/preview.rb
ksk-0.4.5 app/models/concerns/ksk/preview.rb
ksk-0.4.4 app/models/concerns/ksk/preview.rb
ksk-0.4.3 app/models/concerns/ksk/preview.rb
ksk-0.4.2 app/models/concerns/ksk/preview.rb
ksk-0.4.1 app/models/concerns/ksk/preview.rb
ksk-0.4.0 app/models/concerns/ksk/preview.rb
ksk-0.3.4 app/models/concerns/ksk/preview.rb
ksk-0.3.3 app/models/concerns/ksk/preview.rb
ksk-0.3.2 app/models/concerns/ksk/preview.rb
ksk-0.3.0 app/models/concerns/ksk/preview.rb
ksk-0.2.15 app/models/concerns/ksk/preview.rb
ksk-0.2.14 app/models/concerns/ksk/preview.rb
ksk-0.2.13 app/models/concerns/ksk/preview.rb