Use Rails 5.1 defaults and overwrite them

This way we know what we need to do to fully upgrade to Rails 5.1.
This commit is contained in:
Javi Martín
2020-09-05 12:24:26 +02:00
parent 5442ca7c54
commit 00dc58f8b3

View File

@@ -8,12 +8,16 @@ Bundler.require(*Rails.groups)
module Consul module Consul
class Application < Rails::Application class Application < Rails::Application
config.load_defaults 5.0 config.load_defaults 5.1
# Keep belongs_to fields optional by default, because that's the way # Keep belongs_to fields optional by default, because that's the way
# Rails 4 models worked # Rails 4 models worked
config.active_record.belongs_to_required_by_default = false config.active_record.belongs_to_required_by_default = false
# Overwrite Rails 5.1 defaults and use the options we used in Rails 5.0
config.action_view.form_with_generates_remote_forms = false
config.assets.unknown_asset_fallback = true
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)' # config.time_zone = 'Central Time (US & Canada)'