aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/asset_pipeline.textile
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-09-02 22:57:03 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-09-02 22:58:40 +0530
commit44284a613b3efe2319db3f84090c0004505942c1 (patch)
treeadf0e1815ff56d4cc337007f40ad2b6abfb13b2f /railties/guides/source/asset_pipeline.textile
parent220c77dd68430cc150c61119a14c86dee659911c (diff)
downloadrails-44284a613b3efe2319db3f84090c0004505942c1.tar.gz
rails-44284a613b3efe2319db3f84090c0004505942c1.tar.bz2
rails-44284a613b3efe2319db3f84090c0004505942c1.zip
Revert "Fixing guides validation errors."
This reverts commit d20281add192e5afba66e555ce67cf73943b033b. Reason: This needs more investigation. Will apply when this is verified.
Diffstat (limited to 'railties/guides/source/asset_pipeline.textile')
-rw-r--r--railties/guides/source/asset_pipeline.textile6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 86ae23ab11..192c393dca 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -62,11 +62,11 @@ This has several disadvantages:
<ol>
<li>
- <strong>Not all caches will cache content with a query string</strong><br/>
+ <strong>Not all caches will cache content with a query string</strong><br>
"Steve Souders recommends":http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/, "...avoiding a querystring for cacheable resources". He found that in these case 5-20% of requests will not be cached.
</li>
<li>
- <strong>The file name can change between nodes in multi-server environments.</strong><br/>
+ <strong>The file name can change between nodes in multi-server environments.</strong><br>
The query string in Rails is based on the modification time of the files. When assets are deployed to a cluster, there is no guarantee that the timestamps will be the same, resulting in different values being used depending on which server handles the request.
</li>
</ol>
@@ -93,7 +93,7 @@ In production, the default is to precompile these files to +public/assets+ so th
When a scaffold or controller is generated for the application, Rails also generates a JavaScript file (or CoffeeScript file if the +coffee-rails+ gem is in the +Gemfile+) and a Cascading Style Sheet file (or SCSS file if +sass-rails+ is in the +Gemfile+) for that controller.
-For example, if a +ProjectsController+ is generated, there will be a new file at +app/assets/javascripts/projects.js.coffee+ and another at +app/assets/stylesheets/projects.css.scss+. You should put any JavaScript or CSS unique to a controller inside their respective asset files, as these files can then be loaded just for these controllers with lines such as +&lt;%= javascript_include_tag params[:controller] %&gt;+ or +&lt;%= stylesheet_link_tag params[:controller] %&gt;+.
+For example, if a +ProjectsController+ is generated, there will be a new file at +app/assets/javascripts/projects.js.coffee+ and another at +app/assets/stylesheets/projects.css.scss+. You should put any JavaScript or CSS unique to a controller inside their respective asset files, as these files can then be loaded just for these controllers with lines such as +<%= javascript_include_tag params[:controller] %>+ or +<%= stylesheet_link_tag params[:controller] %>+.
NOTE: You will need a "ExecJS":https://github.com/sstephenson/execjs#readme - supported runtime in order to use CoffeeScript. If you are using Mac OS X or Windows you have a JavaScript runtime installed in your operating system. Check "ExecJS":https://github.com/sstephenson/execjs#readme documentation to know all supported JavaScript runtimes.