title: Rails 3 - how to find last inserted ID from mysql table
body: <p>in my controller I have following sequence of commands:</p>
  
  <pre><code>SAVE DATA INTO FIRST TABLE
  
  _get ID of inserted item into table from first step_
  
  SAVE DATA INTO SECOND TABLE WITH ID FROM FIRST COMMAND
  
  if FIRST.save &amp;&amp; SECOND.save
   do something
  </code></pre>
  
  <p>And I am wondering, how to get id of item, which is immediately inserted into database... I tried to googling, but I can't find this information...</p>
  
  <p>Thanks in advance for your hints</p>