How to find the id of a record you have just created in ruby on rails?
How do you get the id of a record you have just created in Ruby on Rails?
Well, the answer to this question came up on the rails mail list recently.
It goes something a little bit like this:
@text.save //insert something into the database
@text.id //get the id of the new record