Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The docs say:</p> <p><strong>Asset Helpers</strong>. When using the asset pipeline, paths to assets must be rewritten. When referencing assets use the following asset helpers (underscored in Ruby, hyphenated in Sass):</p> <pre><code>◦ asset_path($relative-asset-path, $asset-class) - Returns a string to the asset. For example: asset-path("rails.png", image) becomes "/assets/rails.png" ◦ asset_url($relative-asset-path, $asset-class) - Returns url reference to the asset. </code></pre> <p>For example: asset-url("rails.png", image) becomes url(/assets/rails.png) </p> <p><strong>As a convenience</strong>, for each of the following asset classes there are corresponding -path and -url helpers: image, font, video, audio, javascript, stylesheet. For example: image-url("rails.png") becomes url(/assets/rails.png) and image-path("rails.png") becomes "/assets/rails.png".</p> <p>Example:</p> <pre><code>@font-face font-family: HelveticaInseratCom src: font-url('HelveticaInseratCom.ttf') </code></pre> <p>But, i could not do it like that for my rails3.1 app. I had to put the fonts directly in the public folder:</p> <pre><code>/public/HelveticaInseratCom.ttf </code></pre> <p>And in the css.scss.erb file i used:</p> <pre><code>@font-face font-family: HelveticaInseratCom src: url('/HelveticaInseratCom.ttf') </code></pre> <p>This then worked and when running <code>rake assets:precompile</code> worked without throwing this error:</p> <pre><code>rake aborted! HelveticaInseratCom.ttf isn't precompiled </code></pre>
    singulars
    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. This table or related slice is empty.
    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