title: send_file in rails does not download to browser - instead loads in browser window directly
body: <p>I have the following in my .erb:</p>
  
  <pre><code>&lt;%= link_to 'Download PDF', planners_download_pdf_url %&gt;
  </code></pre>
  
  <p>I have the following method to respond: </p>
  
  <pre><code>  def download_pdf
    send_file(
       "#{Rails.root}/Thing/ex/example.xls",
  filename: "mything.xls",
  type: "application/xls"
    )
    end
  </code></pre>
  
  <p>My routes has:</p>
  
  <pre><code>get '/planners/download_pdf'
  </code></pre>
  
  <p>When I click my link, the method does get invoked. My problem is that is doesn't download to the browser. Instead, it takes the tab I have open in the browser and dumps the file as HTML. Like... have you ever seen an Excel file opened in notepad? It does that. See below: </p>
  
  <p><a href="https://i.stack.imgur.com/qJ9SW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qJ9SW.png" alt="Garbage"></a></p>
  
  <p>How do I get this to instead download the file?</p>