front and back-end web development, Leeds, UK


Richard's Blog - Design, coding and life in Japan

Richard

REST

JSON Data for multiple objects and associations in Rails

I 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

Syndicate content