diff options
author | Evan Machnic <emachnic@broadmac.net> | 2011-07-19 14:46:19 -0400 |
---|---|---|
committer | Evan Machnic <emachnic@broadmac.net> | 2011-07-19 14:46:19 -0400 |
commit | 2f4d9ef34e5c70057a9fe9e96e6b1e45d6341497 (patch) | |
tree | 0ce2a69d837b7f13fb267d25bf7dc5e68b788eb5 /railties/guides/source | |
parent | 0cf5160a803ffc219c064cce191dd111b361b377 (diff) | |
download | rails-2f4d9ef34e5c70057a9fe9e96e6b1e45d6341497.tar.gz rails-2f4d9ef34e5c70057a9fe9e96e6b1e45d6341497.tar.bz2 rails-2f4d9ef34e5c70057a9fe9e96e6b1e45d6341497.zip |
image_url documentation in asset_pipelin doc
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/asset_pipeline.textile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index 5884ff7e66..6941eed6d2 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -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 |