title: Rails 3.1 asset urls in SCSS files do not seem to be referencing the assets correctly
body: <p>I just upgraded from Rails 3.0 to Rails 3.1.</p>
  
  <p>I have a <code>foo.css.scss</code> file that references an image (<code>/app/assets/images/foo.png</code>) as follows:</p>
  
  <pre><code>.foo {
    background-image: image-url('foo.png');
  }
  </code></pre>
  
  <p>The problem is that my <code>foo.png</code> file is not loaded and I see 404 errors in my logs.
  The actual css entry that is generated is:</p>
  
  <pre><code>background-image: url(/images/foo.png);
  </code></pre>
  
  <p>which is wrong (?) because the image can be found at <code>/assets/foo.png</code> and not at <code>/images/foo.png</code>.</p>
  
  <p>Note that I am still working on <code>development</code> mode.</p>
  
  <p>Another important note. If I rename my <code>foo.css.scss</code> file to <code>foo.css.erb</code> and use:</p>
  
  <pre><code>background-image: url(&lt;%= image_path('foo.png') %&gt;);
  </code></pre>
  
  <p>it works ok, because it generates <code>/assets/foo.png</code>.</p>
  
  <p>So, the question is why my <code>scss</code> precompiler does not generate the correct <code>css</code>?</p>
  
  <p><strong>Update</strong>: my <code>foo.css.scss</code> file resides:</p>
  
  <pre><code>app/assets/stylesheets/sub_dir/foo.css.scss
  </code></pre>
  
  <p>Does that make any difference?</p>