diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-05-24 08:43:29 -0700 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-05-24 08:53:03 -0700 |
commit | cd6aa9f0952904437c7ecf9f153a3eb3860f3384 (patch) | |
tree | 0e1d406a3c8f1b4f55d0cfbba3686a00882af183 /guides | |
parent | 27874a8e436b20405bcaad75536a3b15ab0cd22a (diff) | |
download | rails-cd6aa9f0952904437c7ecf9f153a3eb3860f3384.tar.gz rails-cd6aa9f0952904437c7ecf9f153a3eb3860f3384.tar.bz2 rails-cd6aa9f0952904437c7ecf9f153a3eb3860f3384.zip |
[Guides] Rewrite Rails application section
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/initialization.textile | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/guides/source/initialization.textile b/guides/source/initialization.textile index fb205bd658..be33f795d3 100644 --- a/guides/source/initialization.textile +++ b/guides/source/initialization.textile @@ -603,27 +603,20 @@ end h4. +railties/lib/rails/application.rb+ -The next file required by +railties/lib/rails.rb+ is +application.rb+. This file defines the +Rails::Application+ constant which the application's class defined in +config/application.rb+ in a standard Rails application depends on. Before the +Rails::Application+ class is defined however, there's some other files that get required first. +The next file required by +railties/lib/rails.rb+ is +application.rb+. +This file defines the +Rails::Application+ constant which the +application's class defined in +config/application.rb+ in a standard +Rails application depends on. -The first of these is +active_support/core_ext/hash/reverse_merge+ which can be "read about in the Active Support Core Extensions guide":active_support_core_extensions.html#merging under the "Merging" section. +Before the +Rails::Application+ class is +defined however, +rails/engine+ is also loaded, which is responsible for +handling the behavior and definitions of Rails engines. -h4. +active_support/file_update_checker.rb+ +TIP: You can read more about engines in the "Getting Started with Engines":engines.html +guide. -The +ActiveSupport::FileUpdateChecker+ class defined within this file is responsible for checking if a file has been updated since it was last checked. This is used for monitoring the routes file for changes during development environment runs. - -h4. +railties/lib/rails/plugin.rb+ - -This file defines +Rails::Plugin+ which inherits from +Rails::Engine+. Unlike +Rails::Engine+ and +Rails::Railtie+ however, this class is not designed to be inherited from. Instead, this is used simply for loading plugins from within an application and an engine. - -This file begins by requiring +rails/engine.rb+ - -h4. +railties/lib/rails/engine.rb+ - -The +rails/engine.rb+ file defines the +Rails::Engine+ class which inherits from +Rails::Railtie+. The +Rails::Engine+ class defines much of the functionality found within a standard application class such as the +routes+ and +config+ methods. - -The "API documentation":http://api.rubyonrails.org/classes/Rails/Engine.html for +Rails::Engine+ explains the function of this class pretty well. - -This file's first line requires +rails/railtie.rb+. +Among other things, Rails Engine is also responsible for loading the +Railtie class. h4. +railties/lib/rails/railtie.rb+ |