Skip to content

Commit

Permalink
Replace send_data with send_file in "Sending files" example
Browse files Browse the repository at this point in the history
  • Loading branch information
toretore committed Apr 29, 2010
1 parent 19e565d commit c68ff4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/guides/source/action_controller_overview.textile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c68ff4b

Please sign in to comment.