diff options
author | Xavier Noria <fxn@hashref.com> | 2011-01-20 10:33:38 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-01-20 10:33:38 +0100 |
commit | 236f1f52cdcb695ee42ec1ad384fc9bee643f435 (patch) | |
tree | d618fb10c41909f826b57e8a0589ed442d186f5a /railties/guides/source/configuring.textile | |
parent | a282301a77288252d135855d088f20de2397998e (diff) | |
parent | 94e0f1db1cf17aa86fed5d7dad50f9e82238900a (diff) | |
download | rails-236f1f52cdcb695ee42ec1ad384fc9bee643f435.tar.gz rails-236f1f52cdcb695ee42ec1ad384fc9bee643f435.tar.bz2 rails-236f1f52cdcb695ee42ec1ad384fc9bee643f435.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'railties/guides/source/configuring.textile')
-rw-r--r-- | railties/guides/source/configuring.textile | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile index 6e72ae6ead..eee18f1131 100644 --- a/railties/guides/source/configuring.textile +++ b/railties/guides/source/configuring.textile @@ -397,6 +397,15 @@ Some parts of Rails can also be configured externally by supplying environment v * +ENV["RAILS_CACHE_ID"]+ and +ENV["RAILS_APP_VERSION"]+ are used to generate expanded cache keys in Rails' caching code. This allows you to have multiple separate caches from the same application. + +h3. Using Initializer Files + +After loading the framework and any gems and plugins in your application, Rails turns to loading initializers. An initializer is any file of Ruby code stored under +config/initializers+ in your application. You can use initializers to hold configuration settings that should be made after all of the frameworks, plugins and gems are loaded, such as options to configure settings for these parts. + +NOTE: You can use subfolders to organize your initializers if you like, because Rails will look into the whole file hierarchy from the initializers folder on down. + +TIP: If you have any ordering dependency in your initializers, you can control the load order by naming. For example, +01_critical.rb+ will be loaded before +02_normal.rb+. + h3. Initialization events Rails has 5 initialization events which can be hooked into (listed in order that they are ran): @@ -551,8 +560,7 @@ TIP: If you have any ordering dependency in your initializers, you can control t *+set_routes_reloader+* Configures Action Dispatch to reload the routes file using +ActionDispatch::Callbacks.to_prepare+. -*+disable_dependency_loading+* - +*+disable_dependency_loading+* Disables the automatic dependency loading if the +config.cache_classes+ is set to +true+ and +config.dependency_loading+ is set to +false+. h3. Changelog |