aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2011-07-08 12:41:00 +1000
committerRyan Bigg <radarlistener@gmail.com>2011-07-09 10:54:08 +1000
commit678dd6f5d6f7ceb92146382c252d0902ab95a226 (patch)
treec392227a9c727181f5bf3f8f9d8ecbd8f40bea28 /railties
parent5f6c6a7677ad4600871adb208c045ead4272c959 (diff)
downloadrails-678dd6f5d6f7ceb92146382c252d0902ab95a226.tar.gz
rails-678dd6f5d6f7ceb92146382c252d0902ab95a226.tar.bz2
rails-678dd6f5d6f7ceb92146382c252d0902ab95a226.zip
Clarify that per-controller asset files are not 'magically' loaded by the controller, but rather need to be required
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/asset_pipeline.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 06602f0218..9ad35b842f 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -88,7 +88,7 @@ This is not to say that assets can (or should) no longer be placed in +public+.
When a scaffold or controller is generated for the application, Rails will also generate a JavaScript file (or CoffeeScript if the +coffee-script+ gem is in the +Gemfile+) and a Cascading Style Sheet file (or SCSS if +sass-rails+ is in the +Gemfile+) file 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 can put any JavaScript or CSS unique to a controller inside their respective asset files.
+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] %>+.
h4. Asset Organization