Skip to content
This repository
Browse code

Added some additional detail on asset caching syntax.

  • Loading branch information...
commit 973bd54d83f38747015e3d85d7f9fa1ee86b6270 1 parent 7a920bc
Mike Gunderloy authored October 07, 2008
18  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
427 427
 -------------------------------------------------------
428 428
 <%= javascript_include_tag "main", "columns", :cache => true %>
429 429
 -------------------------------------------------------
  430
+
  431
+By default, the combined file will be delivered as +javascripts/all.js+. You can specify a location for the cached asset file instead:
  432
+
  433
+[source, ruby]
  434
+-------------------------------------------------------
  435
+<%= javascript_include_tag "main", "columns", :cache => 'cache/main/display' %>
  436
+-------------------------------------------------------
  437
+
  438
+You can even use dynamic paths such as "cache/#{current_site}/main/display"+.
430 439
 	
431 440
 ==== Linking to CSS Files with +stylesheet_link_tag+
432 441
 
@@ -486,6 +495,15 @@ If you're loading multiple CSS files, you can create a better user experience by
486 495
 <%= stylesheet_link_tag "main", "columns", :cache => true %>
487 496
 -------------------------------------------------------
488 497
 	
  498
+By default, the combined file will be delivered as +stylesheets/all.css+. You can specify a location for the cached asset file instead:
  499
+
  500
+[source, ruby]
  501
+-------------------------------------------------------
  502
+<%= stylesheet_link_tag "main", "columns", :cache => 'cache/main/display' %>
  503
+-------------------------------------------------------
  504
+
  505
+You can even use dynamic paths such as "cache/#{current_site}/main/display"+.
  506
+	
489 507
 ==== Linking to Images with +image_tag+
490 508
 
491 509
 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:

0 notes on commit 973bd54

Please sign in to comment.
Something went wrong with that request. Please try again.