Sha256: 0294fa5296bcc1af85f35743d708bb3c90a4b639ca53943b750a21e4bfeb7320
Contents?: true
Size: 771 Bytes
Versions: 4
Compression:
Stored size: 771 Bytes
Contents
class CmsUpload < ActiveRecord::Base Paperclip::Attachment.interpolations[:cms_upload_dir_label] = proc do |attachment, style| attachment.instance.cms_upload_dir_label end # -- AR Extensions -------------------------------------------------------- has_attached_file :file, :url => '/common/:cms_upload_dir_label/:basename.:extension', :path => Rails.public_path + "/common/:cms_upload_dir_label/:basename.:extension" # -- Relationships -------------------------------------------------------- belongs_to :cms_upload_dir belongs_to :cms_user # -- Validations ---------------------------------------------------------- validates :cms_upload_dir_id, :presence => true validates_attachment_presence :file end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lucy_cms-0.0.4 | app/models/cms_upload.rb |
lucy_cms-0.0.3 | app/models/cms_upload.rb |
lucy_cms-0.0.2 | app/models/cms_upload.rb |
lucy_cms-0.0.1 | app/models/cms_upload.rb |