title: Sinatra CSS/Images Issue
body: <p>I have a sinatra app running locally and awhile back I ran into an issue when I went to add styling. I placed the CSS file in <code>public/css/style.css</code> but it wasn't being served. After some troubleshooting I discovered the <code>Rack::Static</code> middleware and that solved the problem at the time, the line I added in <code>config.ru</code> was:</p>
  
  <pre><code>use Rack::Static, :urls =&gt; ["/css", "/images"], :root =&gt; "public"
  </code></pre>
  
  <p>This lets Rack serve the css and images from <code>public/css</code> and <code>public/images</code> respectively. When you link up images or styles in Haml you just use <code>css/style.css</code> and leave the public off. </p>
  
  <p>The issue I have after last night, I created a small file structure inside of my views directory to better organize things, so now when you visit the /contact/new path which renders <code>views/contacts/_form.haml</code> the CSS doesn't work. Viewing source on the page confirms that Rack is attempting to serve the CSS at <code>contacts/css/style.css</code> instead of the correct path of <code>css/style.css</code> such as the main index correctly displays.</p>
  
  <p>How can I fix this to make sure it's always rendering from the root of the URL and not based on the relative location of the view currently being rendered? I tried making <code>root =&gt; "#{File.dirname(__FILE__)/public"</code> in <code>config.ru</code> but that didn't help.</p>