diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash/conversions.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 50dc7c61fc..a76c8a2259 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -1,6 +1,5 @@ require 'date' require 'cgi' -require 'builder' require 'xmlsimple' # Locked down XmlSimple#xml_in_string @@ -113,6 +112,8 @@ module ActiveSupport #:nodoc: alias_method :to_param, :to_query def to_xml(options = {}) + require 'builder' unless defined?(Builder) + options[:indent] ||= 2 options.reverse_merge!({ :builder => Builder::XmlMarkup.new(:indent => options[:indent]), :root => "hash" }) |