lib/happymapper.rb in happymapper-0.4.1 vs lib/happymapper.rb in happymapper-0.5.0
- old
+ new
@@ -138,11 +138,11 @@
#
# Create an xml representation of the specified class based on defined
# HappyMapper elements and attributes. The method is defined in a way
# that it can be called recursively by classes that are also HappyMapper
- # classes, allowg for the composition of classes.
+ # classes, allowing for the composition of classes.
#
def to_xml(parent_node = nil, default_namespace = nil)
#
# Create a tag that uses the tag name of the class that has no contents
@@ -212,10 +212,10 @@
elsif respond_to?(on_save_operation)
value = send(on_save_operation,value)
end
end
- current_node[ "#{attribute_namespace ? "#{attribute_namespace.prefix}:" : ""}#{attribute.tag}" ] = value
+ current_node[ "#{attribute_namespace ? "#{attribute_namespace.prefix}:" : ""}#{attribute.tag}" ] = value.to_s
end
#
# All all the elements defined (e.g. has_one, has_many, element) ...
#