rails send_file with pdf

Very simple...I just want to display a local pdf file that I have saved in my public directory inline and not as a link to download it. So I guess I should be using send_file like so:

<%= send_file("http://localhost:3000/exex11.pdf", :type => 'application/pdf', :disposition => 'inline') %>

However, I get: undefined methodsend_file' for #<#:0x94c3020>` Note, that I know I should use root_url but I'm using localhost:3000 just for testing purposes.

And I checked that this works just to make sure that the file is there:

<%= link_to "The file", "http://localhost:3000/exex11.pdf" %>

Solution 1:

So I guess I should be using send_file like so

I suppose you should using that in your controller's action instead of using in view