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

Version Path
fullstack-cms-0.1.17 app/models/attachment.rb
fullstack-cms-0.1.15 app/models/attachment.rb
fullstack-cms-0.1.14 app/models/attachment.rb
fullstack-cms-0.1.13 app/models/attachment.rb
fullstack-cms-0.1.12 app/models/attachment.rb
fullstack-cms-0.1.11 app/models/attachment.rb
fullstack-cms-0.1.9 app/models/attachment.rb
fullstack-cms-0.1.8 app/models/attachment.rb
fullstack-cms-0.1.7 app/models/attachment.rb
fullstack-cms-0.1.6 app/models/attachment.rb