I noticed that to_xml on an ActiveRecord object that has a boolean
attribute, but that boolean attribute is nil, will serialize out an
xml entry of type boolean but without a value; it's just empty. This
is even the accepted behavior that is tested with
NilXmlSerializationTest's test_should_serialize_boolean.
However, the w3c's xml schema spec on datatypes has something like
this:
"An instance of a datatype that is defined as boolean can have the
following legal literals {true, false, 1, 0}."
So should xml_serialization.rb force all booleans to true/false
instead of allowing for the empty version of the field?
If it should compute_value could just have a:
elsif type == :boolean
value == true
in there?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---