[Rails] newbie problem with FIND

pipo wizarduo at hotmail.com
Wed Aug 9 01:29:44 GMT 2006


hi!

how can i find an ID from a table, with another attribute? i mean, i 
have the table users, with id, and name, and i want to find the id, 
where the name is.

i know only the way with the id..

@something = User.find(params[:id])

which would be the correct syntax?

ty!!

-- 
Posted via http://www.ruby-forum.com/.


More information about the Rails mailing list