From 961f4a9cd257c6e9e9da2e6f3b07012000734552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 28 Mar 2024 02:36:03 +0100 Subject: [PATCH] Enable automatic inverse_of infering It looks like we can't really benefit from this rule because usually we need to specify the option anyway (maybe `user has_many :comments` is one of the few exceptions). We might make some changes in the code when Rubocop changes its Rails/InverseOf rule so it doesn't report this case when using Rails 7, but, until then, we aren't changing anything so we don't have to deal with false positives in Rubocop. --- 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 60dbd8fe1..51df20c28 100644 --- a/config/initializers/new_framework_defaults_7_0.rb +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -50,7 +50,7 @@ Rails.application.config.active_storage.video_preview_arguments = "-vf 'select=eq(n\\,0)+eq(key\\,1)+gt(scene\\,0.015),loop=loop=-1:size=2,trim=start_frame=1' -frames:v 1 -f image2" # Automatically infer `inverse_of` for associations with a scope. -# Rails.application.config.active_record.automatic_scope_inversing = true +Rails.application.config.active_record.automatic_scope_inversing = true # Raise when running tests if fixtures contained foreign key violations # Rails.application.config.active_record.verify_foreign_keys_for_fixtures = true