New to RoR: Need some assistance displaying data from multiple tables.

Nevermind … I figured it out. I was stopping too short into the methods.

Instead of mytasks.title I should have been using mytasks.task.title

This dug down in the the linked/joined table just fine.

-Brian

Hi,

What will be the query that runs for above association ?

Thank You,

Uma Mahesh.

Hello Uma,

I am calling this from my Home Controller, but upon a successful login I store the user_id as a session, but here is the code that I am using and if I understand it correctly RoR handles the rest:

class HomeController < ApplicationController def index @mytasks = TaskOwner.where( :user_id => session[:user_id] ) end end