aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2010-12-27 13:01:08 +1000
committerRyan Bigg <radarlistener@gmail.com>2010-12-27 13:02:51 +1000
commita78e5bcfe4672e412ed1de014a27f0ab40e8cc74 (patch)
tree40fad989cf5ffd027c4a70498bc0c3abc4424e22 /railties/guides/source
parent50a2edbce6a66eeb829eeb072483670b8a9be8d7 (diff)
downloadrails-a78e5bcfe4672e412ed1de014a27f0ab40e8cc74.tar.gz
rails-a78e5bcfe4672e412ed1de014a27f0ab40e8cc74.tar.bz2
rails-a78e5bcfe4672e412ed1de014a27f0ab40e8cc74.zip
Init guide: Cover the config variable set up which is referenced in i18n_railtie
Diffstat (limited to 'railties/guides/source')
-rw-r--r--railties/guides/source/initialization.textile14
1 files changed, 14 insertions, 0 deletions
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
</ruby>
+The +config+ method here is defined on +Rails::Railtie+ and is defined like this:
+<ruby>
+ def config
+ @config ||= Railtie::Configuration.new
+ end
+</ruby>
+
+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 ****