<?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: Good and Not So Good Rails Code</title>
	<atom:link href="http://codeulate.com/2009/06/good-and-not-so-good-rails-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeulate.com/2009/06/good-and-not-so-good-rails-code/</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 11:57:11 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Dan Croak</title>
		<link>http://codeulate.com/2009/06/good-and-not-so-good-rails-code/comment-page-1/#comment-3443</link>
		<dc:creator>Dan Croak</dc:creator>
		<pubDate>Tue, 19 Jan 2010 05:06:06 +0000</pubDate>
		<guid isPermaLink="false">http://codeulate.com/?p=25#comment-3443</guid>
		<description>Check out let-it-be for DRYing up the controller action example:

http://github.com/voxdolo/let-it-be</description>
		<content:encoded><![CDATA[<p>Check out let-it-be for DRYing up the controller action example:</p>
<p><a href="http://github.com/voxdolo/let-it-be" rel="nofollow">http://github.com/voxdolo/let-it-be</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Foobar</title>
		<link>http://codeulate.com/2009/06/good-and-not-so-good-rails-code/comment-page-1/#comment-3281</link>
		<dc:creator>Foobar</dc:creator>
		<pubDate>Thu, 09 Jul 2009 00:14:08 +0000</pubDate>
		<guid isPermaLink="false">http://codeulate.com/?p=25#comment-3281</guid>
		<description>also try

render :partial =&gt; @books</description>
		<content:encoded><![CDATA[<p>also try</p>
<p>render :partial =&gt; @books</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dude</title>
		<link>http://codeulate.com/2009/06/good-and-not-so-good-rails-code/comment-page-1/#comment-3272</link>
		<dc:creator>dude</dc:creator>
		<pubDate>Fri, 26 Jun 2009 15:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://codeulate.com/?p=25#comment-3272</guid>
		<description>Ahh, jakehow beat me to it. With activesupport the (&amp;:name) syntax is very nice indeed!</description>
		<content:encoded><![CDATA[<p>Ahh, jakehow beat me to it. With activesupport the (&amp;:name) syntax is very nice indeed!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dude</title>
		<link>http://codeulate.com/2009/06/good-and-not-so-good-rails-code/comment-page-1/#comment-3271</link>
		<dc:creator>dude</dc:creator>
		<pubDate>Fri, 26 Jun 2009 15:13:07 +0000</pubDate>
		<guid isPermaLink="false">http://codeulate.com/?p=25#comment-3271</guid>
		<description>Why not, for array of book titles:

  def all_titles( books )
    books.map { &#124;book&#124; book.name }
  end

Cleaner, simpler... Inject isn&#039;t very useful here, it just ads extra syntax for no reason :)</description>
		<content:encoded><![CDATA[<p>Why not, for array of book titles:</p>
<p>  def all_titles( books )<br />
    books.map { |book| book.name }<br />
  end</p>
<p>Cleaner, simpler&#8230; Inject isn&#8217;t very useful here, it just ads extra syntax for no reason :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jakehow</title>
		<link>http://codeulate.com/2009/06/good-and-not-so-good-rails-code/comment-page-1/#comment-3270</link>
		<dc:creator>jakehow</dc:creator>
		<pubDate>Fri, 26 Jun 2009 15:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://codeulate.com/?p=25#comment-3270</guid>
		<description>Abuse of inject is pretty rampant.

Better solution:

  def all_titles(books)
    books.map {&#124;book&#124; book.name }
  end

or even: 

  def all_titles(books)
    books.map(&amp;:name)
  end</description>
		<content:encoded><![CDATA[<p>Abuse of inject is pretty rampant.</p>
<p>Better solution:</p>
<p>  def all_titles(books)<br />
    books.map {|book| book.name }<br />
  end</p>
<p>or even: </p>
<p>  def all_titles(books)<br />
    books.map(&amp;:name)<br />
  end</p>
]]></content:encoded>
	</item>
</channel>
</rss>

