aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2010-12-04 11:27:17 +1100
committerRyan Bigg <radarlistener@gmail.com>2010-12-04 11:27:17 +1100
commitc4669d3c027e5d9252ecfbf3a9792fbdb4d878d0 (patch)
tree83aaa1117bae2a979eb9abb02e19bdbfa7279265
parent30bcdff4057374f8ca864bbbbc3f25e35b269801 (diff)
downloadrails-c4669d3c027e5d9252ecfbf3a9792fbdb4d878d0.tar.gz
rails-c4669d3c027e5d9252ecfbf3a9792fbdb4d878d0.tar.bz2
rails-c4669d3c027e5d9252ecfbf3a9792fbdb4d878d0.zip
Config guide: continuing work on documenting the initializers
-rw-r--r--railties/guides/source/configuring.textile70
1 files changed, 67 insertions, 3 deletions
diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile
index 0236e72529..afafabd1e9 100644
--- a/railties/guides/source/configuring.textile
+++ b/railties/guides/source/configuring.textile
@@ -497,11 +497,75 @@ Sets +ActionController::Base.cache_store+ -- if it's not already set -- to +RAI
h4. +action_controller.set_configs+
-Sets up Action View by using the settings in +config.action_controller+ by +send+'ing the method names as setters to +ActionController::Base+ and passing the values through.
+Sets up Action Controller by using the settings in +config.action_controller+ by +send+'ing the method names as setters to +ActionController::Base+ and passing the values through.
+
+h4. +action_controller.compile_config_methods+
+
+Initializes methods for the config settings specified so that they are quicker to access.
+
+h4. +active_record.initialize_timezone+
+
+Sets +ActiveRecord::Base.time_zone_aware_attributes+ to true, as well as setting +ActiveRecord::Base.default_timezone+ to UTC. When attributes are read from the database, they will be converted into the time zone specified by +Time.zone+.
+
+h4. +active_record.logger+
+
+Sets +ActiveRecord::Base.logger+ -- if it's not already set -- to +Rails.logger+.
+
+h4. +active_record.set_configs+
+
+Sets up Active Record by using the settings in +config.active_record+ by +send+'ing the method names as setters to +ActiveRecord::Base+ and passing the values through.
+
+h4. +active_record.initialize_database+
+
+Loads the database configuration (by default) from +config/database.yml+ and establishes a connection for the current environment.
+
+h4. +active_record.log_runtime+
+
+Includes +ActiveRecord::Railties::ControllerRuntime+ which is responsible for reporting the length of time Active Record calls took for the request back to the logger.
+
+h4. +active_record.set_dispatch_hooks+
+
+If +config.cache_classes+ is set to false, all reloadable connections to the database will be reset.
+
+h4. +action_mailer.logger+
+
+Sets +ActionMailer::Base.logger+ -- if it's not already set -- to +Rails.logger+.
+
+h4. +action_mailer.set_configs+
+
+Sets up Action Mailer by using the settings in +config.action_mailer+ by +send+'ing the method names as setters to +ActionMailer::Base+ and passing the values through.
+
+h4. +action_mailer.compile_config_methods+
+
+Initializes methods for the config settings specified so that they are quicker to access.
+
+h4. +active_resource.set_configs+
+
+Sets up Active Resource by using the settings in +config.active_resource+ by +send+'ing the method names as setters to +ActiveResource::Base+ and passing the values through.
+
+h4. +set_load_path+
+
+This initializer runs before +bootstrap_hook+. Adds the +vendor+, +lib+, all directories of +app+ and any paths specified by +config.load_paths+ to +$LOAD_PATH+.
+
+h4. +set_autoload_path+
+
+This initializer runs before +bootstrap_hook+. Adds all sub-directories of +app+ and paths specified by +config.autoload_paths+ to +ActiveSupport::Dependencies.autoload_paths+.
+
+h4. +add_routing_paths+
+
+Loads (by default) all +config/routes.rb+ files (in the application and railties, including engines) and sets up the routes for the application.
+
+h4. +add_locales+
+
+Adds the files in +config/locales+ (from the application, railties and engines) to +I18n.load_path+, making available the translations in these files.
+
+h4. +add_view_paths+
+
+Adds the directory +app/views+ from the application, railties and engines to the lookup path for view files for the application.
+
+h4. +load_environment_config+
-h4 +active_record.initialize_timezone+
-Sets +ActiveRecord::Base.time_zone_aware_attributes+ to true, as well as setting +ActiveRecord::Base.default_timezone+ to UTC.
h4. Initializer files