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.3 app/models/caboose/media_file.rb
caboose-cms-0.5.2 app/models/caboose/media_file.rb
caboose-cms-0.5.1 app/models/caboose/media_file.rb
caboose-cms-0.4.151 app/models/caboose/media_file.rb
caboose-cms-0.4.150 app/models/caboose/media_file.rb
caboose-cms-0.4.149 app/models/caboose/media_file.rb
caboose-cms-0.4.148 app/models/caboose/media_file.rb
caboose-cms-0.4.147 app/models/caboose/media_file.rb
caboose-cms-0.4.146 app/models/caboose/media_file.rb
caboose-cms-0.4.145 app/models/caboose/media_file.rb
caboose-cms-0.4.144 app/models/caboose/media_file.rb
caboose-cms-0.4.143 app/models/caboose/media_file.rb
caboose-cms-0.4.142 app/models/caboose/media_file.rb
caboose-cms-0.4.141 app/models/caboose/media_file.rb
caboose-cms-0.4.140 app/models/caboose/media_file.rb
caboose-cms-0.4.139 app/models/caboose/media_file.rb
caboose-cms-0.4.138 app/models/caboose/media_file.rb
caboose-cms-0.4.137 app/models/caboose/media_file.rb
caboose-cms-0.4.136 app/models/caboose/media_file.rb
caboose-cms-0.4.135 app/models/caboose/media_file.rb