To_xml and underscores

hi,

i am looking for a solution whereupon
calling myEntityObject.to_xml does not
convert my attributes containing underscores
into hyphens.

at the moment an attribute named “my_own_attribute”
is converted into .

does anybody have an idea how to change that
and have to_xml generate <my_own_attribute>

thanks

ciao robertj

On 8/15/06, Robert K. [email protected] wrote:

does anybody have an idea how to change that
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Robert,
Monkeypatch the to_xml() method.
Or create a patch where to_xml() could take a :underscore => false
parameter and submit to trac. Perhaps others would want this
functionality…

Zack C. wrote:

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Robert,
Monkeypatch the to_xml() method.
Or create a patch where to_xml() could take a :underscore => false
parameter and submit to trac. Perhaps others would want this
functionality…

I put in a patch that was committed into RoR Edge where you can pass
:dasherize
=> false to to_xml() and it won’t dasherize your attributes. Hopefully,
it’ll
be in 1.2.

Regards,
Blair