Hi,
I''m trying to set up a simple method to expose to my web services. 
Basically the method just lists all my unshipped orders and it''s line 
items like so:
# From my order model
def self.pending_shipping
   find(:all, :conditions => "shipped_at is null")
end
The relationship between my order and line items table is working 
correctly. However when I look at the XML return from exposing this 
method to the web services like this:
# From order_api.rb
class OrderApi < ActionWebService::API::Base
  api_method   :pending_shipping,
      :returns => [[Order]]
end
All I get is the information from the order model/table. What I would 
like to be able to do is return the order and all it''s related line 
items as a nested array. Could someone advise me on the best way to do 
this?
Much appreciated,
James
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---