[Feature proposal] Add indent option to action view for xml builder templates

Recently I was working on sitemaps and wondering how could I control indent. My first solution was an initializer:

module ActionView
  module Template::Handlers
    class Builder
      # Default format used by Builder.
      class_attribute :default_format
      self.default_format = :xml

      class_attribute :indent
      self.indent = 2

      def call(template)
        require_engine
        "xml = ::Builder::XmlMarkup.new(:indent => #{self.class.indent});" \
          'self.output_buffer = xml.target!;' +
          template.source +
          ';xml.target!;'
      end

      protected

      def require_engine
        @required ||= begin
          require 'builder'
          true
        end
      end
    end
  end
end

ActionView::Template::Handlers::Builder.indent = 0 if Rails.env.production?

I love to use view source to debug all the things. And I love reasonable defaults. But XML is machine-preferred format, and for me save some network bandwidth is good reason to have a config.action_view.xml_indent option. Here is the commit: Add XML builder indent option ยท rails/rails@e06e20a ยท GitHub

What do you think?