diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2010-11-15 21:53:06 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-16 00:04:37 +0100 |
commit | 1d5842b27ce9aa3f160f4bddb290367b5a2d3111 (patch) | |
tree | 46d6bed90393b48c0ec7a053282badcd6f66399e /railties/guides/source | |
parent | 2bed4d94e65f81c07a6e7844936d62be71f6eb24 (diff) | |
download | rails-1d5842b27ce9aa3f160f4bddb290367b5a2d3111.tar.gz rails-1d5842b27ce9aa3f160f4bddb290367b5a2d3111.tar.bz2 rails-1d5842b27ce9aa3f160f4bddb290367b5a2d3111.zip |
updated the rails guide to reflect changes in the action view railtie relating to the asset id cache code
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/initialization.textile | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile index 77c20c8bb0..4cc5f3843f 100644 --- a/railties/guides/source/initialization.textile +++ b/railties/guides/source/initialization.textile @@ -1479,10 +1479,10 @@ Next, the Railtie itself is defined: require "action_view/railties/log_subscriber" log_subscriber ActionView::Railties::LogSubscriber.new - initializer "action_view.cache_asset_timestamps" do |app| + initializer "action_view.cache_asset_id" do |app| unless app.config.cache_classes - ActionView.base_hook do - ActionView::Helpers::AssetTagHelper.cache_asset_timestamps = false + ActiveSupport.on_load(:action_view) do + ActionView::Helpers::AssetTagHelper::AssetPaths.cache_asset_ids = false end end end @@ -1492,7 +1492,7 @@ Next, the Railtie itself is defined: The +ActionView::LogSubscriber+ sets up a method called +render_template+ which is called when a template is rendered. TODO: Templates only or partials and layouts also? I would imagine these fall under the templates category, but there needs to research to ensure this is correct. -The sole initializer defined here, _action_view.cache_asset_timestamps_ is responsible for caching the timestamps on the ends of your assets. If you've ever seen a link generated by +image_tag+ or +stylesheet_link_tag+ you would know that I mean that this timestamp is the number after the _?_ in this example: _/javascripts/prototype.js?1265442620_. This initializer will do nothing if +cache_classes+ is set to false in any of your application's configuration. TODO: Elaborate. +The sole initializer defined here, _action_view.cache_asset_ids_ is responsible for caching the timestamps on the ends of your assets. If you've ever seen a link generated by +image_tag+ or +stylesheet_link_tag+ you would know that I mean that this timestamp is the number after the _?_ in this example: _/javascripts/prototype.js?1265442620_. This initializer will do nothing if +cache_classes+ is set to false in any of your application's configuration. TODO: Elaborate. h4. Action Mailer Railtie @@ -3003,7 +3003,7 @@ The +I18n::Railtie+ also defines an +after_initialize+ which we will return to l **Action View Initializers ** -* action_view.cache_asset_timestamps +* action_view.cache_asset_ids **Action Mailer Initializers ** |