<?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: Fix my mistakes. Just don&#8217;t do it yourself.</title>
	<atom:link href="http://www.dennmart.com/2008/04/03/fix-my-mistakes-just-dont-do-it-yourself/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dennmart.com/2008/04/03/fix-my-mistakes-just-dont-do-it-yourself/</link>
	<description>Official Blog of Dennis Martinez</description>
	<lastBuildDate>Tue, 07 Dec 2010 23:45:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Aleksey Gureiev</title>
		<link>http://www.dennmart.com/2008/04/03/fix-my-mistakes-just-dont-do-it-yourself/comment-page-1/#comment-783</link>
		<dc:creator>Aleksey Gureiev</dc:creator>
		<pubDate>Wed, 14 May 2008 06:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.dennmart.com/?p=63#comment-783</guid>
		<description>Sorry, it ate my nice formatting :)</description>
		<content:encoded><![CDATA[<p>Sorry, it ate my nice formatting <img src='http://www.dennmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleksey Gureiev</title>
		<link>http://www.dennmart.com/2008/04/03/fix-my-mistakes-just-dont-do-it-yourself/comment-page-1/#comment-782</link>
		<dc:creator>Aleksey Gureiev</dc:creator>
		<pubDate>Wed, 14 May 2008 06:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.dennmart.com/?p=63#comment-782</guid>
		<description>Hi Dennis,

Just a little amend to your &quot;Handle errors gracefully&quot; example. You can write even shorter and with less pain.

Given:

  def offer_for_want
    @have_item = HaveItem.find(params[:id])
    ...
  end

You can easily convert it into

  def offer_for_want
    @have_item = HaveItem.find(params[:id])
    ...
  rescue ActiveRecord::RecordNotFound
    flash[:error] = “Some error”
    redirect_to :somewhere
  end

Note that there&#039;s no explicit begin / end for rescue.</description>
		<content:encoded><![CDATA[<p>Hi Dennis,</p>
<p>Just a little amend to your &#8220;Handle errors gracefully&#8221; example. You can write even shorter and with less pain.</p>
<p>Given:</p>
<p>  def offer_for_want<br />
    @have_item = HaveItem.find(params[:id])<br />
    &#8230;<br />
  end</p>
<p>You can easily convert it into</p>
<p>  def offer_for_want<br />
    @have_item = HaveItem.find(params[:id])<br />
    &#8230;<br />
  rescue ActiveRecord::RecordNotFound<br />
    flash[:error] = “Some error”<br />
    redirect_to :somewhere<br />
  end</p>
<p>Note that there&#8217;s no explicit begin / end for rescue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ukesh</title>
		<link>http://www.dennmart.com/2008/04/03/fix-my-mistakes-just-dont-do-it-yourself/comment-page-1/#comment-771</link>
		<dc:creator>ukesh</dc:creator>
		<pubDate>Fri, 04 Apr 2008 06:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.dennmart.com/?p=63#comment-771</guid>
		<description>nice......</description>
		<content:encoded><![CDATA[<p>nice&#8230;&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.033 seconds -->

