diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-10-16 22:13:06 +0200 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-16 22:13:06 +0200 |
commit | 9cb5400871b660e2c6d1654346650f07bb52a0c0 (patch) | |
tree | 6cd292650cf80b25494cf2f800318f337517b732 /railties/doc/guides/actionview | |
parent | 517bc500ed95a84fd2aadff34fdc14cb7965bc6b (diff) | |
download | rails-9cb5400871b660e2c6d1654346650f07bb52a0c0.tar.gz rails-9cb5400871b660e2c6d1654346650f07bb52a0c0.tar.bz2 rails-9cb5400871b660e2c6d1654346650f07bb52a0c0.zip |
Merge docrails
Diffstat (limited to 'railties/doc/guides/actionview')
-rw-r--r-- | railties/doc/guides/actionview/layouts_and_rendering.txt | 19 |
1 files changed, 19 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..00f9dbbdd9 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: @@ -697,6 +715,7 @@ Rails will render the +_product_ruler+ partial (with no data passed in to it) be http://rails.lighthouseapp.com/projects/16213-rails-guides/tickets/15[Lighthouse ticket] +* October 16, 2008: Ready for publication by link:../authors.html#mgunderloy[Mike Gunderloy] * October 4, 2008: Additional info on partials (+:object+, +:as+, and +:spacer_template+) by link:../authors.html#mgunderloy[Mike Gunderloy] (not yet approved for publication) * September 28, 2008: First draft by link:../authors.html#mgunderloy[Mike Gunderloy] (not yet approved for publication) |