How can I add a property to child association before render?
- by ChrisInCambo
Hi,
I have a teacher model which has_many students. When I render a student (as json) I want to strip out the teacher_id property and replace it with the name of the teacher in my representation.
What is the best way to achieve this?
Cheers,
Chris