Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[config guide] mention that to_prepare hooks are called upon every re…

…quest in dev, but only once in production
  • Loading branch information...
commit 00751f02576719291822685bc97214af49887161 1 parent 876d3f2
@radar radar authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/guides/source/configuring.textile
View
2  railties/guides/source/configuring.textile
@@ -461,7 +461,7 @@ Rails has 5 initialization events which can be hooked into (listed in the order
* +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.
+* +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. More importantly, will run upon every request in +development+, but only once (during boot-up) in +production+ and +test+.
* +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+ environment.
Please sign in to comment.
Something went wrong with that request. Please try again.