<?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"
	>
<channel>
	<title>Comments on: map_by_method now increasingly more niftier-er.</title>
	<atom:link href="http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<pubDate>Sun, 20 Jul 2008 23:43:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Dr Nic</title>
		<link>http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-16889</link>
		<dc:creator>Dr Nic</dc:creator>
		<pubDate>Sun, 15 Apr 2007 20:31:03 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-16889</guid>
		<description>@ben: yep that'll get you the same thing, and I think the Symbol.to_proc solution you've got there is going into/has gone into Ruby core itself.

For me, its too many funny characters (2 brackets, an ampersand, and a colon), and it doesn't extend to mapping 2+ methods on the objects in the array.

The upside of the &lt;code&gt;map(&#038;:amount)&lt;/code&gt; syntax is you don't need to invoke &lt;code&gt;to_a&lt;/code&gt; on the associations.

I should get around to fixing that so the association proxy supports the map_by_method idea too.</description>
		<content:encoded><![CDATA[<p>@ben: yep that&#8217;ll get you the same thing, and I think the Symbol.to_proc solution you&#8217;ve got there is going into/has gone into Ruby core itself.</p>
<p>For me, its too many funny characters (2 brackets, an ampersand, and a colon), and it doesn&#8217;t extend to mapping 2+ methods on the objects in the array.</p>
<p>The upside of the <code>map(&#038;:amount)</code> syntax is you don&#8217;t need to invoke <code>to_a</code> on the associations.</p>
<p>I should get around to fixing that so the association proxy supports the map_by_method idea too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-16884</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Sun, 15 Apr 2007 20:07:11 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-16884</guid>
		<description>Perhaps I'm being dull, but can't you just do the first one like:

p.account.transfers.map(&#38;:amount)

?</description>
		<content:encoded><![CDATA[<p>Perhaps I&#8217;m being dull, but can&#8217;t you just do the first one like:</p>
<p>p.account.transfers.map(&amp;:amount)</p>
<p>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr Nic</title>
		<link>http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-16869</link>
		<dc:creator>Dr Nic</dc:creator>
		<pubDate>Sun, 15 Apr 2007 18:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-16869</guid>
		<description>@john - dude, we could play "Code Jinx" - for two people who right the same chunk of code :)</description>
		<content:encoded><![CDATA[<p>@john - dude, we could play &#8220;Code Jinx&#8221; - for two people who right the same chunk of code <img src='http://drnicwilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnpg</title>
		<link>http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-16868</link>
		<dc:creator>johnpg</dc:creator>
		<pubDate>Sun, 15 Apr 2007 18:14:25 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-16868</guid>
		<description>Oh crap, I come up with one good idea and you had to beat me to it. :-(

http://dashing.com/blog/2006/12/09/super_easy_collect_for_activerecord_arrays

Keep up the great work!

Cheers,
John</description>
		<content:encoded><![CDATA[<p>Oh crap, I come up with one good idea and you had to beat me to it. <img src='http://drnicwilliams.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p><a href="http://dashing.com/blog/2006/12/09/super_easy_collect_for_activerecord_arrays" rel="nofollow">http://dashing.com/blog/2006/12/09/super_easy_collect_for_activerecord_arrays</a></p>
<p>Keep up the great work!</p>
<p>Cheers,<br />
John</p>
]]></content:encoded>
	</item>
</channel>
</rss>
