Class: Maglev::Assets::ProxyController

Inherits:
Maglev::ApplicationController show all
Defined in:
app/controllers/maglev/assets/proxy_controller.rb

Instance Method Summary collapse

Methods included from ResourceIdConcern

#resource_id

Instance Method Details

#showObject



6
7
8
9
10
# File 'app/controllers/maglev/assets/proxy_controller.rb', line 6

def show
  @asset = Maglev::Asset.find(resource_id)
  send_data @asset.download, filename: @asset.filename, type: @asset.content_type
  response.headers['Cache-Control'] = cache_control_header
end