Jeremy Holland
2010-Nov-01 03:31 UTC
[patch] Allowing to_xml to rename keys in lower camel case format
Hi all, I''ve created and submitted a patch to resolve an issue I had while attempting to meet the OpenSocial API specifications, which dictates that the xml output have tags formatted as lower camelcase (as opposed to upper camelcase, which is currently the only option). With this patch, simply passing :camelize => true still begets the current behavior, but you can now enable lower camel-casing by passing :camelize => :lower. Please have a look if you get the chance - I appreciate your feedback. https://rails.lighthouseapp.com/projects/8994/tickets/5903-enable-lower-camel-casing-on-to_xml Thanks, Jeremy -- 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 rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Aaron Patterson
2010-Nov-03 17:36 UTC
Re: [patch] Allowing to_xml to rename keys in lower camel case format
On Sun, Oct 31, 2010 at 10:31:52PM -0500, Jeremy Holland wrote:> Hi all, > I''ve created and submitted a patch to resolve an issue I had while > attempting to meet the OpenSocial API specifications, which dictates that > the xml output have tags formatted as lower camelcase (as opposed to upper > camelcase, which is currently the only option). With this patch, simply > passing :camelize => true still begets the current behavior, but you can now > enable lower camel-casing by passing :camelize => :lower. Please have a look > if you get the chance - I appreciate your feedback. > > https://rails.lighthouseapp.com/projects/8994/tickets/5903-enable-lower-camel-casing-on-to_xmlSeems good to me. I''ll apply it after I verify the tests pass. -- Aaron Patterson http://tenderlovemaking.com/