diff options
author | Kelly Stannard <kwstannard@gmail.com> | 2017-11-14 19:26:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 19:26:03 -0500 |
commit | 9d87a172ca32d60526f2b4c4ace0c5dc333f8489 (patch) | |
tree | 8ac81b400c32b6bbaf2f158bf401d8f6e9d7dbce /guides/source | |
parent | 570ae8f8735f32282cf790eb9d8196b007130658 (diff) | |
download | rails-9d87a172ca32d60526f2b4c4ace0c5dc333f8489.tar.gz rails-9d87a172ca32d60526f2b4c4ace0c5dc333f8489.tar.bz2 rails-9d87a172ca32d60526f2b4c4ace0c5dc333f8489.zip |
Update configuring.md
It was brought to my attention that the Rails guide suggests using filenames to ensure code load order, so I thought I would suggest a better alternative.
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/configuring.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 2d03f0a61e..6e129a5680 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -1057,7 +1057,7 @@ After loading the framework and any gems in your application, Rails turns to loa NOTE: You can use subfolders to organize your initializers if you like, because Rails will look into the whole file hierarchy from the initializers folder on down. -TIP: If you have any ordering dependency in your initializers, you can control the load order through naming. Initializer files are loaded in alphabetical order by their path. For example, `01_critical.rb` will be loaded before `02_normal.rb`. +TIP: While Rails supports numbering of initializer file names for load ordering purposes, a better technique is to place any code that need to load in a specific order within the same file. This reduces file name churn, makes dependencies more explicit, and can help surface new concepts within your application. Initialization events --------------------- |