Forum: Ruby on Rails Returning related models with ActionWebService

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
02f1d38e2b05574ff0a07d0f1cbb5272?d=identicon&s=25 Matt Baron (mbaron)
on 2006-06-06 15:36
Hi,

I have an ActionWebService set up and I am wondering if it is possible
to return related models through its intrinsic support for ActiveRecord.

For instance, suppose I have an Author model that has_many Books.  I
would like to return a particular author and all of their books in one
SOAP message.

For now, I've been deconstructing the ActiveRecord Model and stuffing it
all into an AWS::Struct, which is getting to be a huge pain.  I'm
looking for a more elegant solution.

Any recommendations?

Thanks in advance,

Matt
02682b5056c87fce146ebfd17aed7540?d=identicon&s=25 Jaime Bermudez (Guest)
on 2006-06-07 15:44
I've been running into the same issue on a project and haven't found any
useful Rails documentation on the matter.  I've actually posted to the
ruby board before to no avail.  Hopefully, someone can help us both.

- Jaime


Matt Baron wrote:
> Hi,
>
> I have an ActionWebService set up and I am wondering if it is possible
> to return related models through its intrinsic support for ActiveRecord.
>
> For instance, suppose I have an Author model that has_many Books.  I
> would like to return a particular author and all of their books in one
> SOAP message.
>
> For now, I've been deconstructing the ActiveRecord Model and stuffing it
> all into an AWS::Struct, which is getting to be a huge pain.  I'm
> looking for a more elegant solution.
>
> Any recommendations?
>
> Thanks in advance,
>
> Matt
This topic is locked and can not be replied to.