From a8681b7f69987ac908538e920b4a6fad08be2109 Mon Sep 17 00:00:00 2001 From: "Kit (OpenClaw)" Date: Sun, 1 Mar 2026 14:17:36 -0500 Subject: [PATCH] WA-RAILS7-008: Update ActiveSupport::Deprecation for Rails 7.1+ Register deprecator with Rails.application.deprecators when available (Rails 7.1+) while maintaining backward compatibility with Rails 6.x. Closes #700 --- core/lib/workarea.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/lib/workarea.rb b/core/lib/workarea.rb index 4413443fc8..b9f8bc26ef 100644 --- a/core/lib/workarea.rb +++ b/core/lib/workarea.rb @@ -180,7 +180,13 @@ def self.define_content_block_types(&block) # @return [ActiveSupport::Deprecation] # def self.deprecation - @deprecation ||= ActiveSupport::Deprecation.new('3.6', 'Workarea') + @deprecation ||= begin + deprecator = ActiveSupport::Deprecation.new('3.6', 'Workarea') + if Rails.application.respond_to?(:deprecators) + Rails.application.deprecators[:workarea] ||= deprecator + end + deprecator + end end # Whether the app should skip connecting to external services on boot,