From f7a35364d1f84b33976c486518aba404c4eed91b Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 09:28:28 -0400 Subject: [PATCH] fix: remove stale has_many_inversing config for Rails 8.1.3 compatibility (#9) Rails 8.1.3 removed the has_many_inversing= setter on ActiveRecord::Base (the feature is now permanently enabled). However, the ActiveRecord railtie still sets config.active_record.has_many_inversing and tries to apply it via ActiveRecord::Base.send('has_many_inversing=', v), causing: NoMethodError: undefined method 'has_many_inversing=' for class ActiveRecord::Base Fix: delete the key from config.active_record after load_defaults so the railtie never tries to apply the removed setter. Co-authored-by: Bob Develop --- config/application.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/application.rb b/config/application.rb index a2bcddaf..e7e68e11 100644 --- a/config/application.rb +++ b/config/application.rb @@ -19,6 +19,11 @@ module DocuSeal class Application < Rails::Application config.load_defaults 8.1 + # Rails 8.1.3 removed the has_many_inversing= setter on ActiveRecord::Base + # (the feature is now permanently enabled), but load_defaults still sets it + # via the 7.0 framework defaults, causing NoMethodError at boot. + config.active_record.delete(:has_many_inversing) if config.active_record.respond_to?(:delete) + config.autoload_lib(ignore: %w[assets tasks puma]) config.active_storage.routes_prefix = ''