Hi
In fact, we would extend active resource with more restful features.
At the moment, a class-definition with has_many, has_one gives you the
posibility to have a resource with self associations.
For example: an Comment can have other comment and so on.
but for such a restful consume of a web service. a association over
id's isn't precice enougth.
we would build soon a resolver of link-tag in the data structure.
for exampple, a post has many comments, the classical way to define a
association is following:
GET posts/1.xml
<post>
..
</post>
GET posts/1/comments.xml
<comments>
<comment>
<post-id>1</post-id>
</comment>
</comments>
but you must have knowlege over the api server side. you must know the
url where you found the comments.
my prefered way for complexe api structures are link-tags like atom-
syndication-format.
GET posts/1.xm
<post>
<link type="comment" href="comments/1">
<post>
you don't need to know who the comments are, the posts gives his
associated objects.
every instance in restful apis should be selfdescribed.
summary, we would make activeresource smarter for the way, its consume
services and resolve associations and save performance.
at first, we would focus on this. smarter client usage is point two
for us masterplan :D
> Hi Markus,
>
> can associated records be created, using accepts_nested_attributes_for ?
>
> That would be awesome!
>
> El Lunes, 28 de Febrero de 2011 17:16:07 markusschwed escribió:
>
> > Hello everyone,
>
> > I'm new in contributing and i saw in the contributing-guides, that i
> > have to write an email at this list.
> > I hope, that's the right place for this. If it's not, i'M really
> > sorry.. ;)
>
> > Could someone please give me feedback about this lighthouse-ticket?
> >
https://rails.lighthouseapp.com/projects/8994/tickets/6473-activereso...