Doubt in crud statement

hi all,

    while goign thro a projects code i saw a line like:

@projects = User.find(params[:id]).projects.find(:all)

what this line means and what it w’ll return.how to see the content
in @projects object.

On 24 Apr 2008, at 07:37, Karthikragunath B. wrote:

hi all,

   while goign thro a projects code i saw a line like:

@projects = User.find(params[:id]).projects.find(:all)

It finds all the projects for the specified user. (In this particular
case it’s almost equivalent to User.find(params[:id]).projects, but
more generally it’s useful to limit your find to a specific user.)

Fred