Link_to with target=blank

I want to use link_to to link to a new tab or window. I have tried every combination of settings I could either think of or find on the web and it always stays in the source window. For example,

            <%= link_to ("Who is an Addict?", :controller => "pages", :action => "Pdf", :fname=>'who_is_an.pdf'), :target =>'_blank' %>

and

            <%= link_to ("Who is an Addict?", :controller => "pages", :action => "Pdf", :fname=>'who_is_an.pdf', :target =>'_blank') %>

My controller is

    fname = params[:fname]
    fname = File.join(Rails.root, fname)
    send_file(fname, :filename=>fname, :disposition=>'inline')
  end

What happens when you click on that link? What do you see in your console output (assuming you are running this in developer mode) or in your server logs if you’re not?

It occurs to me that you could probably just put this PDF in your public folder somewhere, and link to it directly. Let’s say you add a subdirectory called pdfs inside of [project]/public. Then your link_to would look like this:

link_to 'Who is an Addict?', '/pdfs/who_is_an.pdf', target: :blank

I am pretty sure that would just work, and you avoid cluttering your routes and controllers with one-off links to assets.

Walter