In Ruby on Rails, I have a School with a lot of children. Children who have many activities. And an activity that has one activity_types. I need help developing. In my children's controller. I have this ... that works.
s = School.find(params[:school_id]) @school = s @children = s.children.includes(:activities).all
But I also want to get: activity_type from actions from children. I tried this
s = School.find(params[:school_id]) @school = s @children = s.children.includes(:activities => :activity_types).all
But it didn’t work
source share