From 9cfeefb637b603ce41d3019c8baa95ea984620d7 Mon Sep 17 00:00:00 2001 From: wycats Date: Sat, 15 May 2010 06:08:55 -0700 Subject: Reorganized initializers a bit to enable better hooks for common cases without the need for Railtie. Specifically, the following hooks were added: * before_configuration: this hook is run immediately after the Application class comes into existence, but before the user has added any configuration. This is the appropriate place to set configuration for your plugin * before_initialize: This is run after all of the user's configuration has completed, but before any initializers have begun (in other words, it runs right after config/environments/{development,production,test}.rb) * after_initialize: This is run after all of the initializers have run. It is an appropriate place for forking in a preforking setup Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie. --- railties/guides/source/initialization.textile | 2 -- 1 file changed, 2 deletions(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile index 9ce27fa331..96d6998e1c 100644 --- a/railties/guides/source/initialization.textile +++ b/railties/guides/source/initialization.textile @@ -2379,7 +2379,6 @@ Now that we've referenced that class, it will be required for us. You'll notice * initialize_subscriber * set_clear_dependencies_hook * initialize_dependency_mechanism -* bootstrap_load_path These are all defined using the +initializer+ method: @@ -2930,7 +2929,6 @@ With +@@autoloads+ being * initialize_subscriber * set_clear_dependencies_hook * initialize_dependency_mechanism -* bootstrap_load_path h4. Active Support Initializers -- cgit v1.2.3