Returning related models with ActionWebService


#1

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


#2

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