From: Tom Hughes Date: Fri, 27 Oct 2023 16:38:21 +0000 (+0100) Subject: Enable optimisation of checks for parent record existence X-Git-Tag: live~900^2~6 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ed279071c7db4e03eb04b731d2dd6537efe6e9db Enable optimisation of checks for parent record existence --- diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index c8d12c67e..8ff1fa9ad 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -137,7 +137,7 @@ Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true # Enable validating only parent-related columns for presence when the parent is mandatory. # The previous behavior was to validate the presence of the parent record, which performed an extra query # to get the parent every time the child record was updated, even when parent has not changed. -# Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false +Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false # Enable precompilation of `config.filter_parameters`. Precompilation can # improve filtering performance, depending on the quantity and types of filters.