Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

Enable lower camel-casing on to_xml

#5903

While the to_xml method on activemodel implementations and in the core extensions does allow you to pass :camelize => true as an option, it defaults to upper camel case and allows no alternative. I propose keeping the default behavior, but allowing it to accept :camelize => :lower to indicate that the tag names should be represented as lower camel-case, which is a requirement for certain XML specifications (e.g. OpenSocial XML format).

Reported by Jeremy Holland · November 1st, 2010 @ 03:14 AM

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Jeremy Holland
    Jeremy Holland

    I have implemented this solution in the attached patch.

    November 1st, 2010 @ 03:18 AM

  2. Jeremy Holland
  3. Aaron Patterson
    Aaron Patterson
    • State changed from new to committed
    • Importance changed from to Low

    This is applied to master. Thanks!

    November 3rd, 2010 @ 06:03 PM

  4. Repository
    Repository
    • State changed from committed to resolved

    (from [ea0faa2055fbbe6ac9ebe960ddf4bea8adda287a]) Allowing to_xml :camelize option to be set to :lower to enable lower-camelcase tags [#5903 Enable lower camel-casing on to_xml state:resolved] https://github.com/rails/rails/commit/ea0faa2055fbbe6ac9ebe960ddf4b...

    November 3rd, 2010 @ 06:03 PM