Permalink
Browse files

Replace send_data with send_file in "Sending files" example

  • Loading branch information...
toretore committed Apr 29, 2010
1 parent 19e565d commit c68ff4b27fbf8c7b1c3949b50e69730c9d94f92a
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit c68ff4b

Please sign in to comment.