Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

[dm-serializers] better support for deep object tree #17

Open
solnic opened this issue May 17, 2011 · 0 comments
Open

[dm-serializers] better support for deep object tree #17

solnic opened this issue May 17, 2011 · 0 comments

Comments

@solnic
Copy link
Contributor

solnic commented May 17, 2011

the to_xml can pass in two options :collection_element_name or :element_name whether it is a collection or a single resource. but with this it is very difficult to just change the "storage name". this gist illustrate it: http://gist.github.com/241055

so I think the better way to do define the element name would be using the storage name of resource. the default naming convention for table names are perfect XML element names !!

the patch also includes an issue when I have something like this:

class Child
include DataMapper::Resource

belongs_to :mother, :model => Child
belongs_to :father, :model => Child
end

then child.to_xml(:methods => [:mother, :father]) should produce following xml

currently I get

the last issue I came across was that a property value was frozen and that produces stacktrace in one of the xml serializiers.

so I just want to share my current fork od dm-serializer and if the patches are going to be included then I can add a few more specs for the changes.


Created by kristian - 2009-11-23 13:16:18 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1132

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant