Topic: ActiveRecord Inserted Id
I'm having trouble with ActiveRecord. I thought that after I call @someobject.save and a record was inserted, I could get inserted Id (I'm using MySQL AUTO_INCREMENT field), but it doesn't work:
@someobject = SomeClass.new(params[:someobject])
@someobject.someProperty = "Some String Value"
# Now I should be able to get inserted ID:
insertedId = @someobject.id
# But I'm wrong - @someobject.id is nil
# ... what is going on?
Thanks in advance