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.

XML Root problem when model is in namespace

#669

If ActiveRecord model is placed in namespace for example: Animals::Dog, we have the following thing in to_xml:

attributes goes there

I think that this is not correct. I can use :root option to override root name, but why should i do it.

I've browsed a code and see the following:

root = (options[:root] || @record.class.to_s.underscore).to_s

i think that we should replace underscore method with regular expression, which will replace '::' with '_' and XML will be correct.

Reported by Oleg Richards · July 21st, 2008 @ 02:55 PM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to invalid

    October 23rd, 2008 @ 04:31 PM