# What does the find method return

**URL:** <https://www.ruby-forum.com/t/what-does-the-find-method-return/163376>\
**Category:** Rails\
**Created:** [March 19, 2009, 6:10pm UTC](https://www.ruby-forum.com/t/what-does-the-find-method-return/163376 "2009-03-19T18:10:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [March 19, 2009, 6:10pm UTC](https://www.ruby-forum.com/t/what-does-the-find-method-return/163376/1 "2009-03-19T18:10:08Z")

</div>

does it return an array or a hash and can someone give me an example?

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [March 19, 2009, 6:16pm UTC](https://www.ruby-forum.com/t/what-does-the-find-method-return/163376/2 "2009-03-19T18:16:53Z")

</div>

Why not open up a script/console and just try it out?

On Mar 19, 12:10 pm, Chris G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![farfignugen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f17d59/32.png) [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Post date:** [March 20, 2009, 2:32am UTC](https://www.ruby-forum.com/t/what-does-the-find-method-return/163376/3 "2009-03-20T02:32:54Z")

</div>

And the best answer is: it depends…

Seriously, try out your question via ruby script/console as suggested  
above.

and mix up your find operations…

Person.find(:all)  
Person.find(1)  
Person.find(:first)  
Person.find(:all, :conditions =\> [“id = 1”])  
etc…

console can be quite educational
