From 1d5842b27ce9aa3f160f4bddb290367b5a2d3111 Mon Sep 17 00:00:00 2001
From: Josh Kalderimis <josh.kalderimis@gmail.com>
Date: Mon, 15 Nov 2010 21:53:06 +0100
Subject: updated the rails guide to reflect changes in the action view railtie
 relating to the asset id cache code

---
 railties/guides/source/initialization.textile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'railties/guides/source/initialization.textile')

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 **
 
-- 
cgit v1.2.3

