Forum: Ruby on Rails what does the find method return

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7759594c66801d6f311ff38fd3ddef2a?d=identicon&s=25 Chris Gunnels (ballhogjoni)
on 2009-03-19 18:10
does it return an array or a hash and can someone give me an example?
247cd3d37084a3d6794076207bd9fbd7?d=identicon&s=25 Bob Martens (Guest)
on 2009-03-19 18:16
(Received via mailing list)
Why not open up a script/console and just try it out?

On Mar 19, 12:10 pm, Chris Gunnels <rails-mailing-l...@andreas-s.net>
D188e591eac11021329b8821a5f954c7?d=identicon&s=25 Ar Chron (railsdog)
on 2009-03-20 02:32
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
This topic is locked and can not be replied to.