Sha256: 20fac4d2c556d8601ad0240cf2ecaf3a7ca23f8849851fc376f7d0620eeab565

Contents?: true

Size: 938 Bytes

Versions: 20

Compression:

Stored size: 938 Bytes

Contents

# == Schema Information
#
# Table name: assets
#
#  id                :integer(4)      not null, primary key
#  data_file_name    :string(255)     not null
#  data_content_type :string(255)
#  data_file_size    :integer(4)
#  assetable_id      :integer(4)      not null
#  assetable_type    :string(25)      not null
#  type              :string(25)
#  guid              :string(10)
#  user_id           :integer(4)
#  sort_order        :integer(4)      default(0)
#  created_at        :datetime
#  updated_at        :datetime
#
# Indexes
#
#  index_assets_on_assetable_type_and_assetable_id           (assetable_type,assetable_id)
#  index_assets_on_user_id                                   (user_id)
#
class Asset < ActiveRecord::Base
  include Uploader::Asset

  belongs_to :assetable, polymorphic: true

  def filename
    data_file_name
  end

  def content_type
    data_content_type
  end

  def size
    data_file_size
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rails-uploader-0.5.8 spec/dummy/app/models/asset.rb
rails-uploader-0.5.7 spec/dummy/app/models/asset.rb
rails-uploader-0.5.6 spec/dummy/app/models/asset.rb
rails-uploader-0.5.5 spec/dummy/app/models/asset.rb
rails-uploader-0.5.4 spec/dummy/app/models/asset.rb
rails-uploader-0.5.3 spec/dummy/app/models/asset.rb
rails-uploader-0.5.2 spec/dummy/app/models/asset.rb
rails-uploader-0.5.1 spec/dummy/app/models/asset.rb
rails-uploader-0.5.0 spec/dummy/app/models/asset.rb
rails-uploader-0.4.5 spec/dummy/app/models/asset.rb
rails-uploader-0.4.4 spec/dummy/app/models/asset.rb
rails-uploader-0.4.3 spec/dummy/app/models/asset.rb
rails-uploader-0.4.2 spec/dummy/app/models/asset.rb
rails-uploader-0.4.1 spec/dummy/app/models/asset.rb
rails-uploader-0.4.0 spec/dummy/app/models/asset.rb
rails-uploader-0.3.4 spec/dummy/app/models/asset.rb
rails-uploader-0.3.3 spec/dummy/app/models/asset.rb
rails-uploader-0.3.2 spec/dummy/app/models/asset.rb
rails-uploader-0.3.1 spec/dummy/app/models/asset.rb
rails-uploader-0.3.0 spec/dummy/app/models/asset.rb