Hi, I just started using rails and is having a simple relationship
problem. I would be very grateful anyone can help me.
I created a has many relationship between sessions and work out with
sessions having many workouts. So I though that when I tried doing
<% for session in @sessions %>
<% for workout in session.workouts%>
<% end %>
<% end %>
I thought it would show all the workout that has a session id
corresponding to that session. In the database under workout that is a
session_id column. Do I have to do anything with that? Should I create a
workout_id column under session? Any help woudl be apperciated thanks.