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
Could someone please give me feedback about this lighthouse-ticket?
It's about adding association-definitions in ActiveResource.
Thank you for reading this Mail.
can associated records be created, using accepts_nested_attributes_for ?
That would be awesome!
at the moment there is only the possibility to specify the class-name
for an associated resource via :class_name - option.
We added the association-definitions similar to the ActiveRecord-way
with own Reflection-classes, because we want to add some cool features
in the future.
Indeed, your idea with accepts_nested_attributes_for for create and
update is really good and could be on of these features to add.
Please visit the ticket, apply the patch and give feedback, that would
be very helpful.
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:
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-
<link type="comment" href="comments/1">
you don't need to know who the comments are, the posts gives his
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