1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix Builder::XmlMarkup lazy load in Array#to_xml

Followup to e7514dc670.
This commit is contained in:
Eugene Kenny 2020-04-13 23:04:30 +01:00
parent a0fb2b2227
commit 67467125af
2 changed files with 2 additions and 2 deletions

View file

@ -181,7 +181,7 @@ class Array
# </messages>
#
def to_xml(options = {})
require "active_support/builder" unless defined?(Builder)
require "active_support/builder" unless defined?(Builder::XmlMarkup)
options = options.dup
options[:indent] ||= 2

View file

@ -73,7 +73,7 @@ class Hash
# configure your own builder with the <tt>:builder</tt> option. The method also accepts
# options like <tt>:dasherize</tt> and friends, they are forwarded to the builder.
def to_xml(options = {})
require "active_support/builder" unless defined?(Builder) && defined?(Builder::XmlMarkup)
require "active_support/builder" unless defined?(Builder::XmlMarkup)
options = options.dup
options[:indent] ||= 2