lib/restful/serializers/xml_serializer.rb in purzelrakete-restful-0.2.6 vs lib/restful/serializers/xml_serializer.rb in purzelrakete-restful-0.2.7
- old
+ new
@@ -15,9 +15,11 @@
def serialize(resource, options = {})
xml = options[:builder] || Builder::XmlMarkup.new(:indent => 2)
xml.instruct! unless options[:instruct].is_a?(FalseClass)
+ raise NotImplementedError.new("xml serialization of maps has not been implemented. ") if resource.class == Restful::ApiModel::Map
+
if resource.is_a?(Restful::ApiModel::Collection)
add_collection(resource, xml, show_as_array = false)
else
xml.tag!(*root_element(resource)) do
add_link_to(resource, xml, :self => true)