Benjamin Curtis wrote:
On May 3, 2006, at 5:23 PM, Blair Zajac wrote:
In looking at the to_xml method and its behavior on associations,
currently it includes the attributes from the associations into the
same hash that represents that AR instance being serialized.
Wouldn't it be better to have to_xml call to_xml on the association's
AR instances?
Definitely. This is the way I've done it in the past, when I had to
roll my own, and I think it makes sense.
If people like this idea, I'll code up a patch for it.
I put a patch up at
http://dev.rubyonrails.org/ticket/4989
It includes test suite and I added a :dasherize => false feature that disables
the dasherizing of names. I plan on using Python's xmltramp as a REST client
and not changing the column names in the XML will make it a little easier to
have RoR accept the XML back and update the model.
Regards,
Blair
--
Blair Zajac, Ph.D.
<[EMAIL PROTECTED]>
Subversion training, consulting and support
http://www.orcaware.com/svn/
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core