From e7514dc670df81e15d4def00d9b14621bfe8153c Mon Sep 17 00:00:00 2001 From: Derek Hammer Date: Mon, 13 Apr 2020 13:51:47 -0600 Subject: [PATCH] Load XML Builder if it is not available --- activesupport/lib/active_support/core_ext/hash/conversions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index c368c21c0a731..ce4c805c9bb7b 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -73,7 +73,7 @@ class Hash # configure your own builder with the :builder option. The method also accepts # options like :dasherize and friends, they are forwarded to the builder. def to_xml(options = {}) - require "active_support/builder" unless defined?(Builder) + require "active_support/builder" unless defined?(Builder) && defined?(Builder::XmlMarkup) options = options.dup options[:indent] ||= 2