Sha256: 60d58de14e7b946bc6d28b526efa753af0d83a909468626b731c31797407554e
Contents?: true
Size: 402 Bytes
Versions: 10
Compression:
Stored size: 402 Bytes
Contents
class Attachment < ActiveRecord::Base field :name, :string alias_attribute :title, :name field :description, :text has_attached :file # validates_attachment :file, :presence => true, # :size => { :in => 0..1000.megabytes } belongs_to :attachable, :polymorphic => true attr_accessible :name, :description, :file, :attachable, :attachable_id, :attachable_type, :title end
Version data entries
10 entries across 10 versions & 1 rubygems