<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using transactions with Ruby DataMapper</title>
	<atom:link href="http://blog.kabisa.nl/2010/01/21/using-transactions-with-ruby-datamapper/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kabisa.nl/2010/01/21/using-transactions-with-ruby-datamapper/</link>
	<description>The Ruby on Rails Experts</description>
	<lastBuildDate>Tue, 31 Jan 2012 00:04:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Valentin Burdis</title>
		<link>http://blog.kabisa.nl/2010/01/21/using-transactions-with-ruby-datamapper/comment-page-1/#comment-284</link>
		<dc:creator>Valentin Burdis</dc:creator>
		<pubDate>Sat, 05 Mar 2011 13:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kabisa.nl/?p=52#comment-284</guid>
		<description>What exactly I wouldnt give to get any debate with you about this. You simply say a great number of elements that arrive from nowhere that Im somewhat particular Id have a very fair shot. Your weblog is wonderful visually, I imply men and women wont be bored. But many others who can see previous the videos and also layout wont be so impressed jointly along with your generic knowledge of this topic.</description>
		<content:encoded><![CDATA[<p>What exactly I wouldnt give to get any debate with you about this. You simply say a great number of elements that arrive from nowhere that Im somewhat particular Id have a very fair shot. Your weblog is wonderful visually, I imply men and women wont be bored. But many others who can see previous the videos and also layout wont be so impressed jointly along with your generic knowledge of this topic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ariejan</title>
		<link>http://blog.kabisa.nl/2010/01/21/using-transactions-with-ruby-datamapper/comment-page-1/#comment-43</link>
		<dc:creator>Ariejan</dc:creator>
		<pubDate>Fri, 22 Jan 2010 08:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kabisa.nl/?p=52#comment-43</guid>
		<description>To mimic AR&#039;s behaviour, you could do the following

&lt;pre lang=&quot;ruby&quot;&gt;User.transaction do &#124;t&#124;
  begin
    User.first.update(:name =&gt; &quot;John Smith&quot;)
    Address.first.update(:street =&gt; &quot;Oak St. 400&quot;)
  rescue
    t.rollback
  end
end&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>To mimic AR&#8217;s behaviour, you could do the following</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">User.<span style="color:#9900CC;">transaction</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>t<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#9966CC; font-weight:bold;">begin</span>
    User.<span style="color:#9900CC;">first</span>.<span style="color:#9900CC;">update</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:name</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;John Smith&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    Address.<span style="color:#9900CC;">first</span>.<span style="color:#9900CC;">update</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:street</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;Oak St. 400&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">rescue</span>
    t.<span style="color:#9900CC;">rollback</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
	</item>
</channel>
</rss>

