Keep belongs_to optional by default
Changing it would mean reviewing and changing all our existing models, and some of them might be tricky (like our Document and Image models, which only validate certain associations in some cases), so we're keeping it the way it's been until now.
This commit is contained in:
@@ -10,7 +10,8 @@ module Consul
|
|||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
config.load_defaults 5.0
|
config.load_defaults 5.0
|
||||||
|
|
||||||
# Overwrite Rails 5.0 defaults and use the options we used in Rails 4
|
# 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
|
config.active_record.belongs_to_required_by_default = false
|
||||||
|
|
||||||
# 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user