Sha256: 1beb4d16ce354f8d2bf5da0184b5b511fa42fdf98a5a4ff850deeeddcd985255
Contents?: true
Size: 450 Bytes
Versions: 18
Compression:
Stored size: 450 Bytes
Contents
module Orange class Asset < Orange::Carton id admin do title :name text :caption end orange do string :path, :length => 255 string :mime_type string :secondary_path, :length => 255, :required => false string :secondary_mime_type end def file_path File.join('', 'assets', 'uploaded', path) end def to_asset_tag "<img src=\"#{file_path}\" />" end end end
Version data entries
18 entries across 18 versions & 1 rubygems