title: URL of images in JavaScript code using Rails 3.1 asset pipeline?
body: <p>In CSS files, you can get the proper name of an image asset (with the fingerprint) by using:</p>
  
  <pre><code>background-image: url(image-url("rails.png"))
  </code></pre>
  
  <p>but how do you do the same from a JavaScript file?</p>