From a78e5bcfe4672e412ed1de014a27f0ab40e8cc74 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Mon, 27 Dec 2010 13:01:08 +1000 Subject: Init guide: Cover the config variable set up which is referenced in i18n_railtie --- railties/guides/source/initialization.textile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'railties') diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile index 1504b973a5..ad3a4ffa44 100644 --- a/railties/guides/source/initialization.textile +++ b/railties/guides/source/initialization.textile @@ -715,7 +715,21 @@ This file is the first file that sets up configuration with these lines inside t config.i18n.fallbacks = ActiveSupport::OrderedOptions.new +The +config+ method here is defined on +Rails::Railtie+ and is defined like this: + + def config + @config ||= Railtie::Configuration.new + end + + +At this point, that +Railtie::Configuration+ constant is automatically loaded which causes the +rails/railties/configuration+ file to be loaded. + +h4. +railties/lib/rails/railties/configuration.rb+ + +This file begins with a require out to +rails/configuration+ which has already been required earlier in the process and so isn't required again. + +This file defines the +Rails::Railties::Configuration+ class which is responsible for providing a way to easily configure railties. **** REVIEW IS HERE **** -- cgit v1.2.3