lib/model_xml/generator.rb in model_xml-1.0.11 vs lib/model_xml/generator.rb in model_xml-1.0.12
- old
+ new
@@ -79,9 +79,10 @@
unless options[:skip_instruct]
xml.instruct!
end
root_node = 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
field_list.each do |field|