diff options
author | Tore Darell <toredarell@gmail.com> | 2010-04-29 15:04:10 +0200 |
---|---|---|
committer | Tore Darell <toredarell@gmail.com> | 2010-04-29 15:04:10 +0200 |
commit | c68ff4b27fbf8c7b1c3949b50e69730c9d94f92a (patch) | |
tree | 511a9732dc5c6050a0a92783537243775019ae53 /railties | |
parent | 19e565d005f30c72568eb710a6376c95038ea806 (diff) | |
download | rails-c68ff4b27fbf8c7b1c3949b50e69730c9d94f92a.tar.gz rails-c68ff4b27fbf8c7b1c3949b50e69730c9d94f92a.tar.bz2 rails-c68ff4b27fbf8c7b1c3949b50e69730c9d94f92a.zip |
Replace send_data with send_file in "Sending files" example
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/action_controller_overview.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/action_controller_overview.textile b/railties/guides/source/action_controller_overview.textile index caa7646b7f..8166f94e42 100644 --- a/railties/guides/source/action_controller_overview.textile +++ b/railties/guides/source/action_controller_overview.textile @@ -653,7 +653,7 @@ class ClientsController < ApplicationController # Stream a file that has already been generated and stored on disk. def download_pdf client = Client.find(params[:id]) - send_data("#{Rails.root}/files/clients/#{client.id}.pdf", + send_file("#{Rails.root}/files/clients/#{client.id}.pdf", :filename => "#{client.name}.pdf", :type => "application/pdf") end |