<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>mehblog: How to find the id of a record you have just created in ruby on rails?</title>
    <link>http://blog.pauldalton.co.uk/articles/2005/07/21/how-to-find-the-id-of-a-record-you-have-just-created-in-ruby-on-rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>random mumblings</description>
    <item>
      <title>How to find the id of a record you have just created in ruby on rails?</title>
      <description>&lt;p&gt;How do you get the id of a record you have just created in &lt;a href="http://www.rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt;?&lt;/p&gt;


	&lt;p&gt;Well, the answer to this question came up on the rails mail list recently.&lt;/p&gt;


	&lt;p&gt;It goes something a little bit like this:&lt;/p&gt;


&lt;code&gt;
   @text.save   //insert something into the database
   @text.id      //get the id of the new record 
&lt;/code&gt;</description>
      <pubDate>Thu, 21 Jul 2005 18:00:53 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d8f269914e4633751288bb6389cc4948</guid>
      <author>paul</author>
      <link>http://blog.pauldalton.co.uk/articles/2005/07/21/how-to-find-the-id-of-a-record-you-have-just-created-in-ruby-on-rails</link>
      <category>Rails</category>
    </item>
  </channel>
</rss>
