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