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.

This project is archived and is in readonly mode.

to_xml generates invalid xml with namespaced ActiveRecord redux

#4585

It appears 3.0.0.beta2 regresses #2723 to_xml generates invalid xml with namespaced ActiveRecord:

>> Wheelie-Cyberman:~/code/accounts $ rails c
Loading development environment (Rails 3.0.0.beta2)
>> print Accounts::User.all.to_xml
<?xml version="1.0" encoding="UTF-8"?>
<accounts/users type="array">
  <accounts/user>
    <display-name nil="true"></display-name>
    <email nil="true"></email>
    <id type="integer">1</id>
    <password nil="true"></password>
  </accounts/user>
</accounts/users>
=> nil
>>

Reported by phs · May 12th, 2010 @ 10:02 PM

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

Activity

  1. phs
    phs

    Interestingly, the problem disappears when serializing just one instance:

    >> Wheelie-Cyberman:~/code/accounts $ rails c
    Loading development environment (Rails 3.0.0.beta2)
    >> print Accounts::User.first.to_xml
    <?xml version="1.0" encoding="UTF-8"?>
    <accounts-user>
      <display-name nil="true"></display-name>
      <email nil="true"></email>
      <id type="integer">1</id>
      <password nil="true"></password>
    </accounts-user>
    => nil
    >>
    

    May 12th, 2010 @ 10:06 PM

  2. phs
    phs
    • Title changed from to_xml generates invalid xml with namespaced ActiveRecord to to_xml generates invalid xml with namespaced ActiveRecord redux

    May 12th, 2010 @ 10:13 PM

  3. phs
    phs
    • No changes were found…

    May 12th, 2010 @ 10:13 PM

  4. Neeraj Singh
    Neeraj Singh

    I tested it with rails edge. And this is what I get.

    http://gist.github.com/399447

    May 13th, 2010 @ 04:14 AM

  5. phs
    phs

    False alarm, then. Sorry, my bad (close this as stale whenever)

    May 13th, 2010 @ 04:28 AM

  6. Ryan Bigg
    Ryan Bigg
    • State changed from new to invalid

    May 13th, 2010 @ 11:41 PM