
attractive, usable web applications
Richard's Blog - Design, coding and life in Japan
REST
JSON Data for multiple objects and associations in Rails
Submitted by Richard on Tue, 10/20/2009 - 08:58I am creating a REST API in Rails which outputs JSON data. In some cases I need multiple objects to be pushed out in the data, which is fine until you need to use associations in the mix also.
Example:
form = Form.find(params[:id]) products = Product.all
Tags:
Recent Blog Posts
- Why you should use Rails 3 and not Django 5th Sep 10, 12:28
- Doctrine 2 and why you should use it! 29th Jul 10, 15:23
- How to localize your main blog listing page using Drupal 26th Jun 10, 11:46
- Creating Rails like template helpers in Django 24th Jun 10, 22:01
- Error: No module named messagesdjango.contrib.contenttypes 22nd Jun 10, 22:00