search for: to_xml_nodash

Displaying 2 results from an estimated 2 matches for "to_xml_nodash".

2006 Jul 31
2
is it possible to make to_xml use underscore instead of dash?
Hi all, I am getting ActiveRecord to produce XML with render :xml => @user.to_xml However, on the client end it is a bit annoying for me to deal with attributes like first-name. I would much rather have first_name. Is there any way for me to turn off the behavior of converting _ to -? This seems to be done by a call to dasherize inside the to_xml of
2006 Dec 03
0
How to best change the default value of dasherize (using Edge Rails, and knowing about :dasherize => false)?
...n the Hash::Conversions and Array::Conversions is larger, so I don''t want to override the method just to change the default. Is there any way that I can set the default of :dasherize to false without doing that? [I asked about this when I was on Rails 1.1 and the response was to just add to_xml_nodash methods or modify the to_xml ones, which worked but was unfortunate since by overriding the methods I''d clobber any changes to them. I''m just wondering if anyone who is a Ruby / Rails guru can think of a better way to do this now that there is actually the :dasherize option to pl...