Class: AssetsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/generators/paperclip_i18n/templates/assets_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



2
3
4
5
6
# File 'lib/generators/paperclip_i18n/templates/assets_controller.rb', line 2

def show
  asset = ::Asset.find(params[:id])
  # do security check here
  send_file(asset.data.path, :type => asset.data_content_type)
end