diff options
Diffstat (limited to 'railties/doc/guides/actionview/layouts_and_rendering.txt')
-rw-r--r-- | railties/doc/guides/actionview/layouts_and_rendering.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/railties/doc/guides/actionview/layouts_and_rendering.txt b/railties/doc/guides/actionview/layouts_and_rendering.txt index 278cca20a6..01fd8256f4 100644 --- a/railties/doc/guides/actionview/layouts_and_rendering.txt +++ b/railties/doc/guides/actionview/layouts_and_rendering.txt @@ -427,6 +427,15 @@ If you're loading multiple javascript files, you can create a better user experi ------------------------------------------------------- <%= javascript_include_tag "main", "columns", :cache => true %> ------------------------------------------------------- + +By default, the combined file will be delivered as +javascripts/all.js+. You can specify a location for the cached asset file instead: + +[source, ruby] +------------------------------------------------------- +<%= javascript_include_tag "main", "columns", :cache => 'cache/main/display' %> +------------------------------------------------------- + +You can even use dynamic paths such as "cache/#{current_site}/main/display"+. ==== Linking to CSS Files with +stylesheet_link_tag+ @@ -486,6 +495,15 @@ If you're loading multiple CSS files, you can create a better user experience by <%= stylesheet_link_tag "main", "columns", :cache => true %> ------------------------------------------------------- +By default, the combined file will be delivered as +stylesheets/all.css+. You can specify a location for the cached asset file instead: + +[source, ruby] +------------------------------------------------------- +<%= stylesheet_link_tag "main", "columns", :cache => 'cache/main/display' %> +------------------------------------------------------- + +You can even use dynamic paths such as "cache/#{current_site}/main/display"+. + ==== Linking to Images with +image_tag+ The +image_tag+ helper builds an HTML +<image>+ tag to the specified file. By default, files are loaded from +public/images+. If you don't specify an extension, .png is assumed by default: |