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:
Anna Buianova 2022-01-28 19:19:19 +03:00 committed by GitHub
parent 5afcdb3f71
commit 6a69d9bc61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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