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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs