<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.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>Flvorful Bloggage comments</title>
    <link>http://blog.flvorful.com</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>"Rescuing Ruby" by jake</title>
      <description>&lt;p&gt;yes, most of you are correct.  find_by_id would be much cleaner.  I&amp;#8217;m sorry, i should have used better examples.  I was just trying to illustrate a use of inline rescues.  I dont really use it for that, but i also didnt want to dig through lines of source code to find a realy example (sorry there&amp;#8217;s just too many lines and not enough time :) )&lt;/p&gt;


	&lt;p&gt;&amp;#8212;jake&lt;/p&gt;</description>
      <pubDate>Tue, 14 Aug 2007 13:55:54 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:47492347-2db2-4772-9f3e-80fd9513d257</guid>
      <link>http://blog.flvorful.com/articles/2007/08/11/rescuing-ruby#comment-12</link>
    </item>
    <item>
      <title>"Rescuing Ruby" by Johnny P</title>
      <description>&lt;p&gt;Sorry for the multi comment.  I thought it had been lost and I did not submit, now I know it was due to moderator approval.  Thanks&lt;/p&gt;</description>
      <pubDate>Tue, 14 Aug 2007 13:48:15 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:5711f697-d04b-4302-86e2-21bd4f932bb1</guid>
      <link>http://blog.flvorful.com/articles/2007/08/11/rescuing-ruby#comment-11</link>
    </item>
    <item>
      <title>"Rescuing Ruby" by Johnny P</title>
      <description>&lt;p&gt;Inline rescue is sweet chaining with no method missing magic!&lt;/p&gt;


	&lt;p&gt;send ARGV[1] rescue MyModule.send ARGV[1] unless ARGV[1].nil?&lt;/p&gt;</description>
      <pubDate>Tue, 14 Aug 2007 13:47:13 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:ac38f1b2-c582-4a28-95f1-55d59dfa7b09</guid>
      <link>http://blog.flvorful.com/articles/2007/08/11/rescuing-ruby#comment-10</link>
    </item>
    <item>
      <title>"Rescuing Ruby" by Johnny P</title>
      <description>&lt;p&gt;
I have found using an inline rescue is a nice way to avoid implementing method_missing, polymorphism, or some complex conditional logic.  So, for example you have a simple ruby script with behavior rapped up in some methods where your last statement is:
&lt;/p&gt;
&lt;p&gt;
send ARGV[1]
&lt;/p&gt;
&lt;p&gt;
Now you want to extend this to execute some behavior in a module, class, or object instance, so:
&lt;/p&gt;
&lt;p&gt;
send ARGV[1] rescue MyModule.send ARGV[1] unless ARGV[1].nil?
&lt;/p&gt;
It is short and to the point with the right hand condition keeping all in check.</description>
      <pubDate>Tue, 14 Aug 2007 12:23:46 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e10b9713-6859-4b05-a41c-49bced8f8934</guid>
      <link>http://blog.flvorful.com/articles/2007/08/11/rescuing-ruby#comment-9</link>
    </item>
    <item>
      <title>"Rescuing Ruby" by Andy</title>
      <description>&lt;p&gt;I prefer find_by_id.&lt;/p&gt;</description>
      <pubDate>Tue, 14 Aug 2007 08:43:50 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:7b178b4b-4bcb-4cf0-8bf0-6b5636df62e7</guid>
      <link>http://blog.flvorful.com/articles/2007/08/11/rescuing-ruby#comment-8</link>
    </item>
    <item>
      <title>"Quick Zebra Striping in Rails" by herval</title>
      <description>&lt;p&gt;a new Rails discovery every day&amp;#8230; :-)&lt;/p&gt;</description>
      <pubDate>Tue, 14 Aug 2007 08:26:15 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:32944fd2-72ab-477a-902c-57dad7db541f</guid>
      <link>http://blog.flvorful.com/articles/2007/08/12/quick-zebra-striping-in-rails#comment-7</link>
    </item>
    <item>
      <title>"Quick Zebra Striping in Rails" by Roman Mackovcak</title>
      <description>&lt;p&gt;Nice piece of code. Thanks for the tip.&lt;/p&gt;</description>
      <pubDate>Tue, 14 Aug 2007 07:47:58 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:53b17e30-a957-4125-914e-ba6cde90faa8</guid>
      <link>http://blog.flvorful.com/articles/2007/08/12/quick-zebra-striping-in-rails#comment-6</link>
    </item>
    <item>
      <title>"Quick Zebra Striping in Rails" by rod</title>
      <description>&lt;p&gt;Sweet as it is!
thanks!&lt;/p&gt;</description>
      <pubDate>Tue, 14 Aug 2007 07:25:32 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6b82c125-b5ac-4825-879b-4b1b6a97e9d1</guid>
      <link>http://blog.flvorful.com/articles/2007/08/12/quick-zebra-striping-in-rails#comment-5</link>
    </item>
    <item>
      <title>"Rescuing Ruby" by Dan Kubb</title>
      <description>&lt;p&gt;Another approach is to use &lt;code&gt;find_by_id&lt;/code&gt; instead of &lt;code&gt;find&lt;/code&gt;:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
@person = Person.find_by_id(params[:id])
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;If a person with this id isn&amp;#8217;t found, no exception will be raised, and &lt;code&gt;@person&lt;/code&gt; will be set to nil.&lt;/p&gt;</description>
      <pubDate>Mon, 13 Aug 2007 23:55:18 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4ffbb01a-abc4-43f9-a4d3-f68f47ee66f2</guid>
      <link>http://blog.flvorful.com/articles/2007/08/11/rescuing-ruby#comment-4</link>
    </item>
    <item>
      <title>"Rescuing Ruby" by OJ</title>
      <description>&lt;p&gt;Why does this feel like the Ruby equivalent of VB&amp;#8217;s &amp;#8220;on error resume next&amp;#8221;? :)&lt;/p&gt;


	&lt;p&gt;Personally I can&amp;#8217;t see how you&amp;#8217;d want to carry on when objects aren&amp;#8217;t found, but if I ever do I&amp;#8217;ll keep your advice in mind.&lt;/p&gt;


	&lt;p&gt;Thanks for the post.&lt;/p&gt;</description>
      <pubDate>Mon, 13 Aug 2007 19:05:15 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6765880f-5061-4d6b-ad4d-d53594f42079</guid>
      <link>http://blog.flvorful.com/articles/2007/08/11/rescuing-ruby#comment-3</link>
    </item>
  </channel>
</rss>
