lib/model_xml/generator.rb in model_xml-1.0.13 vs lib/model_xml/generator.rb in model_xml-1.0.14
- old
+ new
@@ -78,10 +78,10 @@
unless options[:skip_instruct]
xml.instruct!
end
- root_node = object.class.to_s
+ root_node = options[:root] || object.class.to_s
root_node = root_node.demodulize if root_node.respond_to?(:demodulize) # Rails only
root_node = root_node.underscore if root_node.respond_to?(:underscore) # Rails only
xml.tag! root_node do