Skip to content

Commit

Permalink
Load XML Builder if it is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
hammerdr committed Apr 13, 2020
1 parent 6f6f4e4 commit e7514dc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
require "active_support/builder" unless defined?(Builder) && defined?(Builder::XmlMarkup)

options = options.dup
options[:indent] ||= 2
Expand Down

0 comments on commit e7514dc

Please sign in to comment.