Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ruby documentation seems a bit unclear on a few things such as the usage of the <code>asset_path</code> and other such helper in stylesheets. Anyways this is what I did to get around the exact same problem: <ol> <li> I decided to do this the SASS-way by changing my stylesheet extensions from <i>css</i> to <i>scss</i>.</li> <li> The image references in my code were changed from <pre>background-image: url(&lt;%= asset_path 'blah.png' %&gt;);</pre> to <pre>background-image: image-url("blah.png");</pre></li> </ol> I found the necessary documentation on the sass helpers on one of the <a href="http://guides.rubyonrails.org/asset_pipeline.html#css-and-sass" rel="nofollow">RailsGuides</a></p> <p><hr> <p>I've also added the <code>config.assets.digest = true</code> line to my <code>config/appliction.rb</code> file because that seemed to get my output HTML to refer to the hashed filenames. Without the <code>digest</code> flag set to true I get all of my link tags starting off with <br /><code>&lt;link href="/assets/print.css?body=1" ...</code> or <br /><code>&lt;href="/assets/favicon.png"...</code> which pretty much defies the purpose of using the assets pipeline. Especially the <i>favicon</i> file will still be cached by the servers and CDN's along the way.</p><p>Explicitely setting the digest flag to true gets me <br /><code>&lt;link href="/assets/print-e47f5a48af04ce6854c840d74cd28fba.css?body=1"</code> and <br /><code>&lt;link href="/assets/favicon-15fb5e00d868940bc32db7996e10f594.png" ...</code></p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload