Skip to content

Commit c95dad5

Browse files
skipkayhiliMacTia
andcommitted
Improve set_load_path documentation
The new documentation explicitly lists all "autoload paths" for the reader, and mentions the `add_autoload_paths_to_load_path` config toggle Co-authored-by: Matt <[email protected]>
1 parent 09d51c9 commit c95dad5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

guides/source/configuring.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3510,7 +3510,11 @@ Below is a comprehensive list of all the initializers found in Rails in the orde
35103510

35113511
* `action_mailer.compile_config_methods`: Initializes methods for the config settings specified so that they are quicker to access.
35123512

3513-
* `set_load_path`: This initializer runs before `bootstrap_hook`. Adds paths specified by `config.paths.load_paths` and all autoload paths to `$LOAD_PATH`.
3513+
* `set_load_path`: This initializer runs before `bootstrap_hook`. Adds paths
3514+
specified by `config.paths.load_paths` to `$LOAD_PATH`. And unless you set
3515+
`config.add_autoload_paths_to_load_path` to `false`, it will also add all
3516+
autoload paths specified by `config.autoload_paths`,
3517+
`config.eager_load_paths`, `config.autoload_once_paths`.
35143518

35153519
* `set_autoload_paths`: This initializer runs before `bootstrap_hook`. Adds all sub-directories of `app` and paths specified by `config.autoload_paths`, `config.eager_load_paths` and `config.autoload_once_paths` to `ActiveSupport::Dependencies.autoload_paths`.
35163520

0 commit comments

Comments
 (0)