title: Why doesn't the extension for the filename get saved for my XLS downloads?
body: <p>I'm trying to export to an XLS file. The file is being saved but without an extension. When I download the file I need to manually add ".xls" to specify it's an Excel file.</p>
  
  <p>Here is my code from my view:</p>
  
  <pre><code>  &lt;%= link_to("Export","http://localhost:3000/policy_management/policy/generate_print_ejecutive/generate_print_ejecutive_comercial.xls") %&gt;
  
    &lt;%= link_to "Export", :controller=&gt;"policy_management/policy",:action=&gt;"generate_print_ejecutive_comercial" ,:format=&gt;"xls",:search =&gt; params[:search],:page =&gt; params[:page],:filename=&gt;"aaa.xls" %&gt;
  </code></pre>
  
  <p>Here is my code from my controller:</p>
  
  <pre><code>respond_to do |format|
     format.html
     format.xls { render  :partial=&gt;"report_by_ejecutive",:filename=&gt;"aaa.xls"}
  end 
  </code></pre>