-
Recent Posts
- Problems connecting to unix:///var/mysql/mysql.sock
- Using rails and respond_to to include nested data
- Handle different environments with PHP
- MySQL 5.5, Mac OS X and startup item security error
- Rails plugin development using WebMock
- Read more, continue reading, and how to easily fix it using WP
- Windows clients with CUPS and Samba
- Making a Cafe Latté without a “do it all” machine
- Using form_tag and collection_select with Rails3
- Switching coffee and PHP testing
Tags
ajax apache api authentication cakephp coffee configuration cups cxf daily365 design firebug gedit hibernate history java javascript jcs job language linux mac mvc mysql non-tech opensource paginate php plugin projects prototypejs quick tip rails ror ruby samba smashingmag snapopen spring terminal test twitter usability wordpress wpml
Tag Archives: rest
Using rails and respond_to to include nested data
I want to display data from a nested table in my XML output using respond_to. I browsed the docs a bit and it seems :include is the way to go. However I had some problems getting this to work properly.
I have two models (customer and user) that are linked together. When I fetch the data for a single user, I want my xml output to include the customer data.
Continue reading “Using rails and respond_to to include nested data” »
Tagged rails, rails3, respond_to, rest
Comments Off