So I’m playing with AWS. I’ve got a thing called a gallery. I’d like
to return a list of them. I can do this fine if I want to return my
ActiveRecord objects:

class WxApiApi < ActionWebService::API::Base
api_method :list_galleries,
:returns => [[Gallery]]

But the ActiveRecord object exposes a lot more than I really want to
return via the web service. So I’m told I should dervice something from
ActiveWebService::Struct, which I did:

class awsGallery < ActionWebService::Struct
member :id, :int

I can’t for the life of me get this to work. I’ve called it
awsGallery.rb and stuck it in app/models. I’ve changed the web service

class WxApiApi < ActionWebService::API::Base
api_method :list_galleries,
:returns => [[awsGallery]]

I get various errors:

awsGallery is not a valid base type

Any idea what I’m doing wrong?



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs