Sha256: 85dec8b217e10567983c605b0d3735329da2240edf4e471193b4bfac9edbc848

Contents?: true

Size: 934 Bytes

Versions: 23

Compression:

Stored size: 934 Bytes

Contents

class Video < Document  
  has_attached_file :file, 
                    :url => '/:class/:id.:extension',
                    :path => ':rails_root/documents/:class/:id_partition/:style',
                    :styles => {
                      :webm => {:format => 'webm'},
                      :flv  => { :format => 'flv' },
                      :thumb48sq  => {:geometry => "48x48" , :format => 'png', :time => 5},
                      :thumbwall => {:geometry => "130x97#", :format => 'png', :time => 5}
                    },
                    :processors => [:ffmpeg]
                    
  process_in_background :file
  
  define_index do
    indexes title
    indexes file_file_name, :as => :file_name
    indexes description
    indexes activity_object.tags.name, :as => :tags
    
    has created_at
  end
                      
  # Thumbnail file
  def thumb(size, helper)
      "#{ size.to_s }/video.png"
  end
  
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
social_stream-0.21.3 documents/app/models/video.rb
social_stream-0.21.2 documents/app/models/video.rb
social_stream-0.21.1 documents/app/models/video.rb
social_stream-0.21.0 documents/app/models/video.rb
social_stream-documents-0.11.0 app/models/video.rb
social_stream-0.20.2 documents/app/models/video.rb
social_stream-documents-0.10.2 app/models/video.rb
social_stream-0.20.1 documents/app/models/video.rb
social_stream-documents-0.10.1 app/models/video.rb
social_stream-0.20.0 documents/app/models/video.rb
social_stream-documents-0.10.0 app/models/video.rb
social_stream-0.19.3 documents/app/models/video.rb
social_stream-documents-0.9.1 app/models/video.rb
social_stream-0.19.2 documents/app/models/video.rb
social_stream-0.19.1 documents/app/models/video.rb
social_stream-0.19.0 documents/app/models/video.rb
social_stream-documents-0.9.0 app/models/video.rb
social_stream-0.18.2 documents/app/models/video.rb
social_stream-documents-0.8.2 app/models/video.rb
social_stream-0.18.1 documents/app/models/video.rb