Class: DownloadsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/downloads_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

caches_page_with_cache_marker, #raise_not_found!

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
# File 'app/controllers/downloads_controller.rb', line 6

def show
  authorize!(:show, @asset)

  headers['X-Accel-Redirect'] = @asset.x_accel_url
  headers['Content-Disposition'] = "attachment; filename=\"#{@asset.filename}\""

  render nothing: true
end