# Doubt in crud statement

**URL:** <https://www.ruby-forum.com/t/doubt-in-crud-statement/135689>\
**Category:** Rails\
**Created:** [April 24, 2008, 8:37am UTC](https://www.ruby-forum.com/t/doubt-in-crud-statement/135689 "2008-04-24T08:37:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikragu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a88e57/32.png) [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Post date:** [April 24, 2008, 8:37am UTC](https://www.ruby-forum.com/t/doubt-in-crud-statement/135689/1 "2008-04-24T08:37:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![karthikragu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a88e57/32.png) [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Post date:** [April 24, 2008, 11:30am UTC](https://www.ruby-forum.com/t/doubt-in-crud-statement/135689/2 "2008-04-24T11:30:12Z")

</div>

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
