From 9b4525ac71e75640a32030d158d6897f030729f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 28 Mar 2024 02:51:26 +0100 Subject: [PATCH] Disable ActiveRecord partial inserts As mentioned in the Rails pull request [1], the main reason for partial inserts is no longer relevant thanks to the `ignored_columns` method (which we haven't even needed so far). I don't have a preference regarding this setting; we're enabling it in order to reduce the number of settings we customize. [1] Pull request 42769 in https://github.com/rails/rails --- config/initializers/new_framework_defaults_7_0.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb index eb631c265..04b2bb5ad 100644 --- a/config/initializers/new_framework_defaults_7_0.rb +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -58,7 +58,7 @@ Rails.application.config.active_record.verify_foreign_keys_for_fixtures = true # Disable partial inserts. # This default means that all columns will be referenced in INSERT queries # regardless of whether they have a default or not. -# Rails.application.config.active_record.partial_inserts = false +Rails.application.config.active_record.partial_inserts = false # Protect from open redirect attacks in `redirect_back_or_to` and `redirect_to`. # Rails.application.config.action_controller.raise_on_open_redirects = true