Sha256: 64f7f3d3e923f4e7acaadfd89b687f11498cd06ff2c825732b4f1b1e9f48aec7

Contents?: true

Size: 623 Bytes

Versions: 2

Compression:

Stored size: 623 Bytes

Contents

class VideosController < InheritedResources::Base
  load_and_authorize_resource
  
  def show
    path = @video.file.path(params[:style])
    if(params[:style].present?)
      path = path.split('.')[0]+'.'+params[:style]
    end
    respond_to do |format|
      format.all {send_file path, 
                  :type => @video.file_content_type,
                  :disposition => "inline"}
    end
  end
  
  def index
    @document_activities = current_subject.wall(:profile,
                                        :for => current_subject,
                                        :object_type => :Video).all;
  end
    
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
social_stream-documents-0.1.1 app/controllers/videos_controller.rb
social_stream-documents-0.1.0 app/controllers/videos_controller.rb