title: Rails 3.2 download file when remote form submitted
body: <p>I have this remote form on a static page.</p>
  
  <pre><code>&lt;%= form_tag(reports_products_path, :method =&gt; "post", :action =&gt; "products", :remote =&gt; true)  do%&gt;
     &lt;%= submit_tag "Generate Product Report" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>This is my controller action fired when that form is submitted:</p>
  
  <pre><code>def products
    @products = Product.joins(:client).all
    respond_to do |format|
      format.html
      format.pdf
      format.js do
        pdf = PrintedProductPdf.new(@products)
        File.open("public/product_report/product#{Date.today}.pdf", "wb") { |f| f &lt;&lt; pdf.render }
        send_data pdf.render, 
          file_name: "public/product_report/product#{Date.today}.pdf",
          :type =&gt; "application/pdf", 
          :disposition =&gt; "attachment"
    end
  end
  </code></pre>
  
  <p>end</p>
  
  <p>The file writes when the form link is clicked.  However I want the ability to download the file when the submit button in the form is clicked.  The send data function seems to be sending the attachment to lala land</p>