diff --git a/config/application.rb b/config/application.rb index b137dd5f6..feb4c8664 100644 --- a/config/application.rb +++ b/config/application.rb @@ -8,9 +8,14 @@ Bundler.require(*Rails.groups) module Consul class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. + config.load_defaults 5.1 + + # Keep belongs_to fields optional by default, because that's the way + # Rails 4 models worked + config.active_record.belongs_to_required_by_default = false + + # Use local forms with `form_with`, so it works like `form_for` + config.action_view.form_with_generates_remote_forms = false # 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. diff --git a/config/environments/development.rb b/config/environments/development.rb index 0e3e7f9d9..07840b58c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -46,10 +46,6 @@ Rails.application.configure do # number of complex assets. config.assets.debug = true - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. diff --git a/config/environments/preproduction.rb b/config/environments/preproduction.rb index 3c21e58c7..86926d740 100644 --- a/config/environments/preproduction.rb +++ b/config/environments/preproduction.rb @@ -36,10 +36,6 @@ Rails.application.configure do # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files. diff --git a/config/environments/production.rb b/config/environments/production.rb index 9fe36cf48..f0d84f33d 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -30,10 +30,6 @@ Rails.application.configure do # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Enable serving of images, stylesheets, and JavaScripts from an asset server. diff --git a/config/environments/staging.rb b/config/environments/staging.rb index c189f787c..c3eb3df2c 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -36,10 +36,6 @@ Rails.application.configure do # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files.