title: Text file download link (ruby on rails)
body: <p>I want to add a download link to my html page. Download will be a .txt file. I have done this,</p>
  
  <pre><code>&lt;a href="path_to_file/myfile.txt"&gt;click to download txt &lt;/a&gt;
  </code></pre>
  
  <p>But the problem is, when a user clicks this link, instead of asking user to download the file, it simply shows the text in the browser. </p>
  
  <p>How can I change this script to ask user to download the file (with the default download prompt dialog box)</p>
  
  <p>UPDATE: Thanks all for the replies. I'm using ruby/rails on the server side.</p>