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.
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.
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