Method: ActsAsAssets::AssetsController#get
- Defined in:
- app/controllers/acts_as_assets/assets_controller.rb
#get ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'app/controllers/acts_as_assets/assets_controller.rb', line 55 def get begin @asset = klazz.find(params[:asset_id]) send_file(file_to_download_path, {:filename => File.basename(@asset.asset.path), :content_type => @asset.asset_content_type, :disposition => 'inline'}) rescue ActiveRecord::RecordNotFound respond_with_404 end end |