Class: Maglev::AssetsController

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

Instance Method Summary collapse

Instance Method Details

#showObject



5
6
7
8
# File 'app/controllers/maglev/assets_controller.rb', line 5

def show
  @asset = Maglev::Asset.find(params[:id])
  send_data @asset.download, filename: @asset.filename, type: @asset.content_type
end