I have a Model called List that has_many :entries. As usual, Rails 3 generated this show method for List
List
has_many :entries
def show @li
Yes, there's an :include option you can give to to_json:
:include
to_json
format.json { render json: @list.to_json(:include => :entries) }