From 2bedfacf3bbde5193e68f9f6db8a057d9ed45cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 15 Apr 2024 04:46:39 +0200 Subject: [PATCH] Disable deprecated singular association names This doesn't affect us (since luckily we never use them), and, since doing something like `Budget::Investment.where(budgets: 1)` would be very confusing, getting an error when writing this code is IMHO better than just getting a warning, which was the default before Rails 7.1 [1]. [1] https://guides.rubyonrails.org/v7.1/configuring.html#config-active-record-allow-deprecated-singular-associations-name --- config/initializers/new_framework_defaults_7_1.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index 7a3bae9e2..19993439f 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -71,7 +71,7 @@ Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default ### # Disable deprecated singular associations names. #++ -# Rails.application.config.active_record.allow_deprecated_singular_associations_name = false +Rails.application.config.active_record.allow_deprecated_singular_associations_name = false ### # Enable the Active Job `BigDecimal` argument serializer, which guarantees