title: Rails: ZIP file shown in browser instead of being downloaded
body: <p>My controller sends a ZIP file:</p>
  
  <pre><code>def index
    respond_to do |format|
      format.html  { render :text =&gt; open("tmp/test1.zip", "rb").read }
    end
  end
  </code></pre>
  
  <p><b>PROBLEM:</b> the ZIP is received as text shown in the browser.<br>
  I would like it to come as a download.</p>
  
  <p>Note: I wrote <code>format.html</code> because when I write <code>format.zip</code> I get <code>uninitialized constant Mime::ZIP</code>. That is probably part of the problem.</p>