title: Rails CSV attachment opens in browser instead of downloading
body: <p>In my rails 3 application I provide a CSV template for users to download.  Instead of downloading it simply opens the text in a new tab.  Here is the code:</p>
  
  <pre><code>&lt;a href="/templates/myFile.csv" target="_blank"&gt;click here&lt;/a&gt;
  </code></pre>
  
  <p>This was working for me previously and I'm not sure what could have changed to break it.  Other questions similar to this suggest adding <code>target='_blank'</code> or changing the headers but I haven't had much luck doing so.</p>
  
  <p>I don't think it should make a difference, but this link is inside of a modal who's body comes from here:</p>
  
  <pre><code>&lt;div class="modal hide" id="helpModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
    &lt;%= modal_header "Help" %&gt;
     &lt;div class="modal-body"&gt;
      &lt;%= render 'help' %&gt;
    &lt;/div&gt;
    &lt;div class="modal-footer"&gt;
      &lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;Close&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>