aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-12-31 15:07:57 +0900
committerGitHub <noreply@github.com>2017-12-31 15:07:57 +0900
commit71b4bf698f7443bd8d2e436bc9f37b4d6ec8fc8d (patch)
tree3a1b122a61e1a9056c4e4433348da777ea940633
parent7fae88f71d7ac0a0c0755ff5172fbde00c8a3248 (diff)
parentfdd76b7370a38bc7ac047d424d7b8e7e0a0eaf83 (diff)
downloadrails-71b4bf698f7443bd8d2e436bc9f37b4d6ec8fc8d.tar.gz
rails-71b4bf698f7443bd8d2e436bc9f37b4d6ec8fc8d.tar.bz2
rails-71b4bf698f7443bd8d2e436bc9f37b4d6ec8fc8d.zip
Merge pull request #31602 from eugeneius/config_eager_load
Clarify that config.eager_load controls eager loading [ci skip]
-rw-r--r--guides/source/engines.md12
-rw-r--r--railties/lib/rails/application/finisher.rb2
-rw-r--r--railties/lib/rails/railtie/configuration.rb2
3 files changed, 8 insertions, 8 deletions
diff --git a/guides/source/engines.md b/guides/source/engines.md
index 33694cf76a..8d81296fa5 100644
--- a/guides/source/engines.md
+++ b/guides/source/engines.md
@@ -1516,12 +1516,12 @@ To hook into the initialization process of one of the following classes use the
These are the available configuration hooks. They do not hook into any particular framework, but instead they run in context of the entire application.
-| Hook | Use Case |
-| ---------------------- | ------------------------------------------------------------------------------------- |
-| `before_configuration` | First configurable block to run. Called before any initializers are run. |
-| `before_initialize` | Second configurable block to run. Called before frameworks initialize. |
-| `before_eager_load` | Third configurable block to run. Does not run if `config.cache_classes` set to false. |
-| `after_initialize` | Last configurable block to run. Called after frameworks initialize. |
+| Hook | Use Case |
+| ---------------------- | ---------------------------------------------------------------------------------- |
+| `before_configuration` | First configurable block to run. Called before any initializers are run. |
+| `before_initialize` | Second configurable block to run. Called before frameworks initialize. |
+| `before_eager_load` | Third configurable block to run. Does not run if `config.eager_load` set to false. |
+| `after_initialize` | Last configurable block to run. Called after frameworks initialize. |
### Example
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb
index 3d938be951..c4b188aeee 100644
--- a/railties/lib/rails/application/finisher.rb
+++ b/railties/lib/rails/application/finisher.rb
@@ -58,7 +58,7 @@ module Rails
end
# This needs to happen before eager load so it happens
- # in exactly the same point regardless of config.cache_classes
+ # in exactly the same point regardless of config.eager_load
initializer :run_prepare_callbacks do |app|
app.reloader.prepare!
end
diff --git a/railties/lib/rails/railtie/configuration.rb b/railties/lib/rails/railtie/configuration.rb
index 48853129bc..70274b948c 100644
--- a/railties/lib/rails/railtie/configuration.rb
+++ b/railties/lib/rails/railtie/configuration.rb
@@ -55,7 +55,7 @@ module Rails
ActiveSupport.on_load(:before_configuration, yield: true, &block)
end
- # Third configurable block to run. Does not run if +config.cache_classes+
+ # Third configurable block to run. Does not run if +config.eager_load+
# set to false.
def before_eager_load(&block)
ActiveSupport.on_load(:before_eager_load, yield: true, &block)