Skip to content

Commit d011b3a

Browse files
committed
Improve Rails 7.2 compatibility
On trying to upgrade to Rails 7.2, I was experiencing [SystemStackError: stack level too deep (SystemStackError)] On debugging, I found the object triggering this was an instance of ActiveRecord::Transaction. Adding this condition in appears to fix the problem.
1 parent 4d605eb commit d011b3a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

meta_request/lib/meta_request/event.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def sanitize_hash(payload)
6666

6767
def not_encodable?(value)
6868
return true if defined?(ActiveRecord) && value.is_a?(ActiveRecord::ConnectionAdapters::AbstractAdapter)
69+
return true if defined?(ActiveRecord) && defined?(ActiveRecord::Transaction) && value.is_a?(ActiveRecord::Transaction)
6970
return true if defined?(ActionDispatch) && (value.is_a?(ActionDispatch::Request) || value.is_a?(ActionDispatch::Response))
7071
return true if defined?(ActionView) && value.is_a?(ActionView::Helpers::FormBuilder)
7172

0 commit comments

Comments
 (0)