This project is archived and is in readonly mode.

#4585 ✓invalid
phs

to_xml generates invalid xml with namespaced ActiveRecord redux

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

It appears 3.0.0.beta2 regresses #2723:

>> 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
>>

Comments and changes to this ticket

  • phs

    phs May 12th, 2010 @ 10:06 PM

    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
    >>
    
  • phs

    phs May 12th, 2010 @ 10:13 PM

    • Title changed from “to_xml generates invalid xml with namespaced ActiveRecord ” to “to_xml generates invalid xml with namespaced ActiveRecord redux”
  • phs

    phs May 12th, 2010 @ 10:13 PM

    • no changes were found...
  • Neeraj Singh

    Neeraj Singh May 13th, 2010 @ 04:14 AM

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

    http://gist.github.com/399447

  • phs

    phs May 13th, 2010 @ 04:28 AM

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

  • Ryan Bigg

    Ryan Bigg May 13th, 2010 @ 11:41 PM

    • State changed from “new” to “invalid”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages