The lack of an array attribute on a container was causing ARes clients to fail with the error: `instantiate_collection': undefined method `collect!', which ActiveRecord's to_xml method does by default.
Signed-off-by: Jason Guiditta jason.guiditta@gmail.com --- lib/converters/xml_converter.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/converters/xml_converter.rb b/lib/converters/xml_converter.rb index 7723615..7987bb2 100644 --- a/lib/converters/xml_converter.rb +++ b/lib/converters/xml_converter.rb @@ -29,7 +29,7 @@ module Converters def convert(obj, builder=nil) builder ||= Builder::XmlMarkup.new( :indent=>2 ) if ( obj.is_a?( Array ) ) - builder.__send__( @type.to_s.pluralize.gsub( /_/, '-' ).to_sym ) do + builder.__send__( @type.to_s.pluralize.gsub( /_/, '-' ).to_sym, :type => :array ) do obj.each do |e| convert( e, builder ) end
deltacloud-devel@lists.fedorahosted.org