|
87 | 87 |
|
88 | 88 | * +config.dependency_loading+ is a flag that allows you to disable constant autoloading setting it to false. It only has effect if +config.cache_classes+ is true, which it is by default in production mode. This flag is set to false by +config.threadsafe!+. |
89 | 89 |
|
| 90 | +* +config.eager_load+ when true, eager loads all registered `config.eager_load_namespaces`. This includes your application, engines, Rails frameworks and any other registered namespace. |
| 91 | + |
| 92 | +* +config.eager_load_namespaces+ registers namespaces that are eager loaded when +config.eager_load+ is true. All namespaces in the list must respond to the +eager_load!+ method. |
| 93 | + |
90 | 94 | * +config.eager_load_paths+ accepts an array of paths from which Rails will eager load on boot if cache classes is enabled. Defaults to every folder in the +app+ directory of the application. |
91 | 95 |
|
92 | 96 | * +config.encoding+ sets up the application-wide encoding. Defaults to UTF-8. |
@@ -125,10 +129,6 @@ config.session_store :my_custom_store |
125 | 129 |
|
126 | 130 | This custom store must be defined as +ActionDispatch::Session::MyCustomStore+. In addition to symbols, they can also be objects implementing a certain API, like +ActiveRecord::SessionStore+, in which case no special namespace is required. |
127 | 131 |
|
128 | | -* +config.threadsafe!+ enables +cache_classes+ and +eager_load+ to make the application threadsafe. |
129 | | - |
130 | | -WARNING: Threadsafe operation is incompatible with the normal workings of development mode Rails. In particular, automatic dependency loading and class reloading are automatically disabled when you call +config.threadsafe!+. |
131 | | - |
132 | 132 | * +config.time_zone+ sets the default time zone for the application and enables time zone awareness for Active Record. |
133 | 133 |
|
134 | 134 | * +config.whiny_nils+ enables or disables warnings when a certain set of methods are invoked on +nil+ and it does not respond to them. Defaults to true in development and test environments. |
@@ -746,13 +746,13 @@ The error occurred while evaluating nil.each |
746 | 746 |
|
747 | 747 | *+build_middleware_stack+* Builds the middleware stack for the application, returning an object which has a +call+ method which takes a Rack environment object for the request. |
748 | 748 |
|
749 | | -*+eager_load!+* If +config.cache_classes+ is true, runs the +config.before_eager_load+ hooks and then calls +eager_load!+ which will load all the Ruby files from +config.eager_load_paths+. |
| 749 | +*+eager_load!+* If +config.eager_load+ is true, runs the +config.before_eager_load+ hooks and then calls +eager_load!+ which will load all +config.eager_load_namespaces+. |
750 | 750 |
|
751 | 751 | *+finisher_hook+* Provides a hook for after the initialization of process of the application is complete, as well as running all the +config.after_initialize+ blocks for the application, railties and engines. |
752 | 752 |
|
753 | 753 | *+set_routes_reloader+* Configures Action Dispatch to reload the routes file using +ActionDispatch::Callbacks.to_prepare+. |
754 | 754 |
|
755 | | -*+disable_dependency_loading+* Disables the automatic dependency loading if the +config.cache_classes+ is set to true and +config.dependency_loading+ is set to false. |
| 755 | +*+disable_dependency_loading+* Disables the automatic dependency loading if the +config.eager_load+ is set to true. |
756 | 756 |
|
757 | 757 | h3. Database pooling |
758 | 758 |
|
|
0 commit comments