Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Config guide: Space out initialization events to improve readability

  • Loading branch information...
commit 85a940f1a6ced6071ab7b95c7c4dabe5ad617295 1 parent f0029d0
@radar radar authored fxn committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 railties/guides/source/configuring.textile
View
4 railties/guides/source/configuring.textile
@@ -395,9 +395,13 @@ h3. Initialization events
Rails has 5 initialization events which can be hooked into (listed in order that they are ran):
* +before_configuration+: This is run as soon as the application constant inherits from +Rails::Application+. The +config+ calls are evaluated before this happens.
+
* +before_initialize+: This is run directly before the initialization process of the application occurs with the +:bootstrap_hook+ initializer near the beginning of the Rails initialization process.
+
* +to_prepare+: Run after the initializers are ran for all Railties (including the application itself), but before eager loading and the middleware stack is built.
+
* +before_eager_load+: This is run directly before eager loading occurs, which is the default behaviour for the _production_ environment and not for the +development+ enviroment.
+
* +after_initialize+: Run directly after the initialization of the application, but before the application initializers are run.
Please sign in to comment.
Something went wrong with that request. Please try again.