Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

image_url documentation in asset_pipelin doc

  • Loading branch information...
commit 2f4d9ef34e5c70057a9fe9e96e6b1e45d6341497 1 parent 0cf5160
Evan Machnic emachnic authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 railties/guides/source/asset_pipeline.textile
10 railties/guides/source/asset_pipeline.textile
View
@@ -157,7 +157,15 @@ Note that the closing tag cannot be of the style +-%>+.
h5. CSS and SCSS
-TODO: Sass-rails's handy +image_url+ helpers
+When using the asset pipeline, paths to assets must be re-written and +sass-rails+ provides +_url+ and +_path+ helpers for the following asset classes: image, font, video, audio, javascript, stylesheet.
+
+* +image_url("rails.png")+ becomes +url(/assets/rails.png)+
+* +image_path("rails.png")+ becomes +"/assets/rails.png"+.
+
+The more generic form can also be used but the asset path and class must both be specified:
+
+* +asset_url("rails.png", image)+ becomes +url(/assets/rails.png)+
+* +asset_path("rails.png", image)+ becomes +"/assets/rails.png"+
h4. Manifest Files and Directives
Please sign in to comment.
Something went wrong with that request. Please try again.