KevinSimonson
12/8/2007 6:40:00 PM
I've got a Ruby file where I take a table from my database named "Poc"
and I've created a row in that table by executing:
Poc.create()
How do I access the id of the row I've just created? I could do some-
thing like this:
Poc.create( :user_name => '')
and then do a "Poc.find()" that searches for a row with the empty
string as its "user_name", but seems like such a round-about way of
doing it. Is there a more direct way?
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_