Use Rails 6.0 defaults and overwrite them

We can remove the `new_framework_defaults_6_0` file by using Rails 6.0
default options and overwriting the ones we haven't enabled.

We're still using the classic autoloader because we still haven't
checked how switching to zeitwerk will affect the way CONSUL
installations customize their code.

And we're using the default queues for Active Storage because we were
already using them and that will be the default option in Rails 6.1.
This commit is contained in:
Javi Martín
2021-09-18 03:55:30 +02:00
parent 1ea4988e52
commit 7fe2309762
2 changed files with 10 additions and 46 deletions

View File

@@ -21,7 +21,7 @@ Bundler.require(*Rails.groups)
module Consul
class Application < Rails::Application
config.load_defaults 5.2
config.load_defaults 6.0
# Keep belongs_to fields optional by default, because that's the way
# Rails 4 models worked
@@ -34,6 +34,15 @@ module Consul
# in any CONSUL installations
config.active_support.use_authenticated_message_encryption = false
# Keep using the classic autoloader until we decide how custom classes
# should work with zeitwerk
config.autoloader = :classic
# Use the default queue for ActiveStorage like we were doing with Rails 5.2
# because it will also be the default in Rails 6.1.
config.active_storage.queues.analysis = nil
config.active_storage.queues.purge = nil
# Keep reading existing data in the legislation_annotations ranges column
config.active_record.yaml_column_permitted_classes = [ActiveSupport::HashWithIndifferentAccess, Symbol]