diff options
Diffstat (limited to 'railties/guides')
-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 |