Rails send_data doesn't save file
<p>I'm using Nokogiri to generate an XML file in my app. I want to save this file, and I want to display a dialog box in which the user can select the folder in which download this file. 
This is the action in my controller:</p>

<pre><code>def download
  require 'nokogiri'

  if owner_signed_in?

   @slips = current_owner.slips

   builder = Nokogiri::XML::Builder.new do |xml|

   xml.cedolini{

     @slips.each do |slip|
       xml.cedolino{
         xml.codicecliente_ slip.client_code
         xml.data_ slip.day.to_s

         xml.ordini{
           slip.product_slips.each do |order|

             xml.ordine {
               xml.codicearticolo_ order.product_code
               xml.descrizionearticolo_ order.product_description
               xml.ammontare_ order.amount.to_s
             }
           end
         }
       }
     end
   }
   end


   file = builder.to_xml
   send_data file, :type =&gt; 'text/xml; charset=UTF-8;',  :disposition =&gt; "attachment; filename=db.xml"

  end
end
</code></pre>

<p>I have the route defined in this way:</p>

<pre><code>  get '/dbsinc/download'
</code></pre>

<p>When I call the action from the view, it doesn't save the XML, I see a new page with the url of my action, and in the page I see the XML file rendered on the page, but it doesn't open any dialog box to save the file.
Where am I getting wrong? Thanks</p>