Sha256: ee28f2be29b154c3c24390162ac89dc6264ef561d012fbcaaef97292258b8d5b

Contents?: true

Size: 454 Bytes

Versions: 102

Compression:

Stored size: 454 Bytes

Contents

class Caboose::MediaFile < ActiveRecord::Base

  self.table_name = "media_files"
  belongs_to :media_category
  has_attached_file :file, :path => 'media-files/:id.:extension'
  do_not_validate_attachment_file_type :file  
  attr_accessible :id, :media_category_id, :name, :description
  
  def api_hash
    {
      :id => self.id,
      :name => self.name,      
      :description => self.description,
      :url => self.file.url      
    }
  end

end

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
caboose-cms-0.5.25 app/models/caboose/media_file.rb
caboose-cms-0.5.24 app/models/caboose/media_file.rb
caboose-cms-0.5.23 app/models/caboose/media_file.rb
caboose-cms-0.5.21 app/models/caboose/media_file.rb
caboose-cms-0.5.20 app/models/caboose/media_file.rb
caboose-cms-0.5.19 app/models/caboose/media_file.rb
caboose-cms-0.5.17 app/models/caboose/media_file.rb
caboose-cms-0.5.16 app/models/caboose/media_file.rb
caboose-cms-0.5.15 app/models/caboose/media_file.rb
caboose-cms-0.5.14 app/models/caboose/media_file.rb
caboose-cms-0.5.13 app/models/caboose/media_file.rb
caboose-cms-0.5.12 app/models/caboose/media_file.rb
caboose-cms-0.5.11 app/models/caboose/media_file.rb
caboose-cms-0.5.10 app/models/caboose/media_file.rb
caboose-cms-0.5.9 app/models/caboose/media_file.rb
caboose-cms-0.5.8 app/models/caboose/media_file.rb
caboose-cms-0.5.7 app/models/caboose/media_file.rb
caboose-cms-0.5.6 app/models/caboose/media_file.rb
caboose-cms-0.5.5 app/models/caboose/media_file.rb
caboose-cms-0.5.4 app/models/caboose/media_file.rb