Rails serving files outside assets folder and public folder
<p><strong>Rails version:</strong> Rails 3.2.15</p>

<p><strong>Ruby version:</strong> ruby 1.9.3p551 (2014-11-13 revision 48407)</p>

<p><strong>Issue:</strong></p>

<blockquote>
  <p>My rails app in development mode is serving files from <strong>storage</strong> folder which is at root level. The file format is pdf and mp4.</p>
  
  <p>By serving i mean if I hit the route directly Eg: <a href="http://localhost:3000/assets/file_name.pdf" rel="nofollow">http://localhost:3000/assets/file_name.pdf</a> is not throwing error and instead is opening on the browser.</p>
  
  <p>I want to put these files behind authentication and hence tried putting it outside <strong>app/assets</strong> and <strong>public/</strong> folders.</p>
  
  <p>I'm not sure why is it able to serve any file outside those directories. Here are few of my configs for reference:</p>
  
  <p><code>config.assets.enabled = true</code></p>
  
  <p><code>config.assets.compress = false</code></p>
  
  <p><code>config.assets.debug = true</code></p>
</blockquote>

<p>Please help...</p>