Is there any way to use the to_json includes when using
"render :json"?

I've got this:

format.json { render :json => { :order => @orders } }

But I'd also like to include the address (order.address) association.
The "to_json" method has all these options, but I don't see how I can
use that with render :json.  If I tack on the to_json to @orders the
render :json escapes the whole thing.  I'm using Ext JS on the client
side.

Thanks!

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to