Orbit/app/models/asset.rb

17 lines
274 B
Ruby

class Asset
include Mongoid::Document
include Mongoid::Timestamps
mount_uploader :data, AssetUploader
field :filename
field :description
validates_presence_of :filename, :data
belongs_to :asset_category
belongs_to :assetable, polymorphic: true
end