Sha256: 98ebf4a197f22605d4be042f38493cccba43b807d5ddc9c733d2f64d0d530d70

Contents?: true

Size: 627 Bytes

Versions: 90

Compression:

Stored size: 627 Bytes

Contents

class Lalala::AbstractAsset < ActiveRecord::Base
  include Lalala::ExtActiveRecord::I18nTranslationsWriter::Writer

  self.abstract_class = true
  self.table_name = "assets"

  attr_accessible :asset, :title, :caption, :translations_writer

  translates :title, :caption
  Lalala::AbstractAsset::Translation.table_name = 'asset_translations'

  belongs_to :asset_owner, polymorphic: true

  def self.extension_white_list
    if self.uploaders and self.uploaders[:asset]
      list = self.uploaders[:asset].new.try(:extension_white_list) || []
    else
      list = []
    end

    list.map { |e| ".#{e}" }.join(",")
  end

end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
lalala-4.0.0.dev.416 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.407 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.396 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.395 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.393 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.388 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.385 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.382 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.374 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.372 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.368 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.366 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.357 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.354 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.351 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.350 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.349 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.344 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.343 app/models/lalala/abstract_asset.rb
lalala-4.0.0.dev.339 app/models/lalala/abstract_asset.rb