<?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: 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>
	<lastBuildDate>Tue, 16 Mar 2010 14:19:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Avram</title>
		<link>http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/comment-page-1/#comment-194816</link>
		<dc:creator>Avram</dc:creator>
		<pubDate>Sat, 13 Feb 2010 21:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2006/10/26/map_by_method-now-increasingly-more-niftier-er/#comment-194816</guid>
		<description>Hello,

I&#039;m having a problem with the map_by_method gem. I don&#039;t understand why, but when I require it from ~/.irbrc, it does not actually get required - *and* any require statements I have after it also seem to have no effect.

However, when I require it manually from a rails console, it works fine.

All I am saying in .irbrc is:
require &#039;map_by_method&#039;

which is exactly the same thing I say in the console when I do it manually, and it works. Any help would be appreciated.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I&#8217;m having a problem with the map_by_method gem. I don&#8217;t understand why, but when I require it from ~/.irbrc, it does not actually get required &#8211; *and* any require statements I have after it also seem to have no effect.</p>
<p>However, when I require it manually from a rails console, it works fine.</p>
<p>All I am saying in .irbrc is:<br />
require &#8216;map_by_method&#8217;</p>
<p>which is exactly the same thing I say in the console when I do it manually, and it works. Any help would be appreciated.</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-page-1/#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&#039;ll get you the same thing, and I think the Symbol.to_proc solution you&#039;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&#039;t extend to mapping 2+ methods on the objects in the array.

The upside of the &lt;code&gt;map(&amp;:amount)&lt;/code&gt; syntax is you don&#039;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-page-1/#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&#039;m being dull, but can&#039;t you just do the first one like:

p.account.transfers.map(&amp;: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-page-1/#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 &quot;Code Jinx&quot; - for two people who right the same chunk of code :)</description>
		<content:encoded><![CDATA[<p>@john &#8211; dude, we could play &#8220;Code Jinx&#8221; &#8211; 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-page-1/#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>
