Sha256: 838d442cb57e067da30d2c20aa8aa767a0694ef873ee25b9c470cb8111569850
Contents?: true
Size: 424 Bytes
Versions: 6
Compression:
Stored size: 424 Bytes
Contents
class Kuhsaft::Asset < ActiveRecord::Base scope :by_date, order('updated_at DESC') mount_uploader :file, Kuhsaft::AssetUploader def file_type if file.url.present? && ext = file.url.split('.').last ext.to_sym unless ext.blank? end end def name File.basename(file.path) if file.present? && file.path.present? end def path file.url end def path=val # do nothing end end
Version data entries
6 entries across 6 versions & 1 rubygems