Displaying 1 result from an estimated 1 matches for "test_send_first".
2005 Mar 06
1
Force a file download AND render a page
...# download doesn''t happen
@download_url = "http://#{@request.env[''SERVER_NAME'']}/#{path}"
render "file/download"
send_file(#{@request.env[''DOCUMENT_ROOT]''/#{path}",
:type => "application/pdf")
end
def test_send_first(path)
@download_url = "http://#{@request.env[''SERVER_NAME'']}/#{path}"
send_file(#{@request.env[''DOCUMENT_ROOT]''/#{path}",
:type => "application/pdf")
render "file/download"
end
If I call test_render_first, the pa...