Hello,
I have two tables 'users' and 'loads' in the models I have defined that 'loads' belongs to a user and that a user have many loads
Now when I want to show details for a load I use this in my controller:
@load = Load.find(params[:id])
and then in my view output data like:
<%=h @load.user_id %>
<%=h @load.date %>
.
.
.
What I would like is to output data from both tables so in this case in my view I instead of 'user_id' I would output the name of the user from the 'users' table.
All ideas are welcome.