Sha256: 6457ca5490b521a40a01a08a9a9bff90998364343dd42df7903d4b6ac4123c08

Contents?: true

Size: 966 Bytes

Versions: 16

Compression:

Stored size: 966 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 activity_object.title
    indexes file_file_name, :as => :file_name
    indexes activity_object.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

16 entries across 16 versions & 2 rubygems

Version Path
social_stream-0.24.1 documents/app/models/video.rb
social_stream-documents-0.12.1 app/models/video.rb
social_stream-0.24.0 documents/app/models/video.rb
social_stream-documents-0.12.0 app/models/video.rb
social_stream-0.23.4 documents/app/models/video.rb
social_stream-0.23.3 documents/app/models/video.rb
social_stream-documents-0.11.5 app/models/video.rb
social_stream-0.23.2 documents/app/models/video.rb
social_stream-documents-0.11.4 app/models/video.rb
social_stream-0.23.1 documents/app/models/video.rb
social_stream-documents-0.11.3 app/models/video.rb
social_stream-0.22.1 documents/app/models/video.rb
social_stream-documents-0.11.2 app/models/video.rb
social_stream-0.22.0 documents/app/models/video.rb
social_stream-0.21.4 documents/app/models/video.rb
social_stream-documents-0.11.1 app/models/video.rb