title: Using send_file in rails
body: <p>I'm sending a ms-word file using rails.
  i.e when I click on a link, a doc file from tmp folder (in project) is sent.</p>
  
  <p>The code I'm using is</p>
  
  <pre><code>@filename ="#{RAILS_ROOT}/tmp/test/test.doc"
  send_file(@filename ,
              :filename      =&gt;  "test",
              :type          =&gt;  'application/msword',
              :disposition  =&gt;  'attachment',
              :streaming    =&gt;  'true',
          :buffer_size  =&gt;  '4096')
  </code></pre>
  
  <p>It's working, but it's sending an empty file. Content is missing in the file. Any suggestions?</p>