Set config.cache_classes for test env depending on whether Spring is enabled (#16344)
* Set config.cache_classes for test env depending on whether Spring is enabled * Explain setting config.cache_classes in the test env
This commit is contained in:
parent
5afcdb3f71
commit
6a69d9bc61
1 changed files with 3 additions and 1 deletions
|
|
@ -9,7 +9,9 @@ require "active_support/core_ext/integer/time"
|
|||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
config.cache_classes = true
|
||||
# cache_classes should be false when Spring is enabled, and true when it's disabled
|
||||
# https://guides.rubyonrails.org/configuring.html#config-cache-classes
|
||||
config.cache_classes = ActiveModel::Type::Boolean.new.cast(ENV["DISABLE_SPRING"])
|
||||
|
||||
# See https://github.com/rails/rails/issues/40613#issuecomment-727283155
|
||||
config.action_view.cache_template_loading = true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue