aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTore Darell <toredarell@gmail.com>2010-04-29 15:04:10 +0200
committerTore Darell <toredarell@gmail.com>2010-04-29 15:04:10 +0200
commitc68ff4b27fbf8c7b1c3949b50e69730c9d94f92a (patch)
tree511a9732dc5c6050a0a92783537243775019ae53
parent19e565d005f30c72568eb710a6376c95038ea806 (diff)
downloadrails-c68ff4b27fbf8c7b1c3949b50e69730c9d94f92a.tar.gz
rails-c68ff4b27fbf8c7b1c3949b50e69730c9d94f92a.tar.bz2
rails-c68ff4b27fbf8c7b1c3949b50e69730c9d94f92a.zip
Replace send_data with send_file in "Sending files" example
-rw-r--r--railties/guides/source/action_controller_overview.textile2
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